summaryrefslogtreecommitdiffstats
path: root/core/test/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/test/ch/asynk/tankontank')
-rw-r--r--core/test/ch/asynk/tankontank/BoardUtils.java9
-rw-r--r--core/test/ch/asynk/tankontank/Helpers.java5
2 files changed, 9 insertions, 5 deletions
diff --git a/core/test/ch/asynk/tankontank/BoardUtils.java b/core/test/ch/asynk/tankontank/BoardUtils.java
index 295d198..7bdbe42 100644
--- a/core/test/ch/asynk/tankontank/BoardUtils.java
+++ b/core/test/ch/asynk/tankontank/BoardUtils.java
@@ -108,15 +108,18 @@ public class BoardUtils
Helpers.FakePawn p = new Helpers.FakePawn(3);
HashSet<GridPoint2> points = new HashSet<GridPoint2>();
- int n = b.possiblePaths(p, 2, 2, 4, 3, points);
+ GridPoint2 from = new GridPoint2(2, 2);
+ GridPoint2 to = new GridPoint2(4, 3);
+
+ int n = b.possiblePaths(p, from, to, points);
assertTrue(n == 8);
assertTrue(points.size() == 8);
- n = b.possiblePathsFilterAdd(3, 3, points);
+ n = b.possiblePathsFilterToggle(3, 3, points);
assertTrue(n == 5);
assertTrue(points.size() == 6);
- n = b.possiblePathsFilterAdd(4, 4, points);
+ n = b.possiblePathsFilterToggle(4, 4, points);
assertTrue(n == 1);
assertTrue(points.size() == 4);
}
diff --git a/core/test/ch/asynk/tankontank/Helpers.java b/core/test/ch/asynk/tankontank/Helpers.java
index 29e2969..b8699cd 100644
--- a/core/test/ch/asynk/tankontank/Helpers.java
+++ b/core/test/ch/asynk/tankontank/Helpers.java
@@ -3,6 +3,7 @@ package ch.asynk.tankontank;
import ch.asynk.tankontank.engine.Pawn;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.Board;
+import ch.asynk.tankontank.engine.Orientation;
import ch.asynk.tankontank.engine.SearchBoard;
public class Helpers
@@ -44,9 +45,9 @@ public class Helpers
}
public boolean blockLineOfSightFrom(Tile from) { return false; }
public boolean atLeastOneMove(Pawn pawn) { return true; }
- public boolean road(Board.Orientation side) { return false; }
+ public boolean road(Orientation side) { return false; }
public boolean hasTargetsFor(Pawn pawn) { return false; }
- public int costFrom(Pawn pawn, Board.Orientation side, boolean road) { return 1; }
+ public int costFrom(Pawn pawn, Orientation side, boolean road) { return 1; }
}
public static class FakeBoard extends Board