@Override public void makeMove() { System.out.println(""); /*ArrayList<ArrayList<Route>> foo = getPath(Destination.Seattle, Destination.Boston, true); Routes routesf = Routes.getInstance(); for(ArrayList<Route> routes :foo){ System.out.println("Route from "+ routes.get(0).getDest1().name() + " to "+ routes.get(0).getDest2().name()+" at cost "+ routes.get(0).getCost()); //System.out.print(routes.get(0).getDest1().name()+" "); }*/ if (super.getDestinationTickets().isEmpty()) { super.drawDestinationTickets(); } Goal foo = bestOption(super.getDestinationTickets()); foo.execute(this); // super.drawTrainCard(0); // Do I still have goals to accomplish // if no, get new goals // attempt to do current goal // is it a good goal still? // if it isnt move onto next goal // what defines a good goal // time left in game // chance of successful completion // interference from opponent }
public Goal copy() { Goal dst = new Goal(); copyValues(dst); if (identifier != null) { dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); } ; dst.patient = patient == null ? null : patient.copy(); dst.description = description == null ? null : description.copy(); dst.status = status == null ? null : status.copy(); dst.notes = notes == null ? null : notes.copy(); if (concern != null) { dst.concern = new ArrayList<Reference>(); for (Reference i : concern) dst.concern.add(i.copy()); } ; return dst; }