IMovement

Hey would you look at that
This commit is contained in:
Brady
2018-10-08 19:57:22 -05:00
parent 1245e222a7
commit d177db5a35
18 changed files with 179 additions and 93 deletions
@@ -467,10 +467,10 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
while (moves.contains(null)) {
moves.remove(null);
}
moves.sort(Comparator.comparingDouble(movement -> movement.getCost(new CalculationContext())));
moves.sort(Comparator.comparingDouble(Movement::getCost));
for (Movement move : moves) {
String[] parts = move.getClass().toString().split("\\.");
double cost = move.getCost(new CalculationContext());
double cost = move.getCost();
String strCost = cost + "";
if (cost >= ActionCosts.COST_INF) {
strCost = "IMPOSSIBLE";