diff options
Diffstat (limited to 'core/test/ch')
-rw-r--r-- | core/test/ch/asynk/tankontank/BoardUtils.java | 12 | ||||
-rw-r--r-- | core/test/ch/asynk/tankontank/Helpers.java | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/core/test/ch/asynk/tankontank/BoardUtils.java b/core/test/ch/asynk/tankontank/BoardUtils.java index 53d3b0e..e18b9d1 100644 --- a/core/test/ch/asynk/tankontank/BoardUtils.java +++ b/core/test/ch/asynk/tankontank/BoardUtils.java @@ -36,14 +36,14 @@ public class BoardUtils @Test public void testPaths() { - int n = b.buildPossiblePaths(2, 2, 4, 3); + int n = b.buildPathBuilder(2, 2, 4, 3); - assertTrue(b.possiblePaths.distance == 2); + assertTrue(b.pathBuilder.distance == 2); assertTrue(n == 8); for(int p = 0; p < n; p++) { - Path path = b.possiblePaths.getPath(p); + Path path = b.pathBuilder.getPath(p); int z = path.tiles.size(); assertTrue(path.cost == (z + 1)); @@ -95,16 +95,16 @@ public class BoardUtils @Test public void testPathSet() { - int n = b.buildPossiblePaths(2, 2, 3, 3); + int n = b.buildPathBuilder(2, 2, 3, 3); assertTrue(n == 1); - n = b.buildPossiblePaths(2, 2, 4, 3); + n = b.buildPathBuilder(2, 2, 4, 3); assertTrue(n == 8); n = b.togglePoint(3, 3); assertTrue(n == 1); - n = b.buildPossiblePaths(2, 2, 5, 3); + n = b.buildPathBuilder(2, 2, 5, 3); assertTrue(n == 3); n = b.togglePoint(3, 3); diff --git a/core/test/ch/asynk/tankontank/Helpers.java b/core/test/ch/asynk/tankontank/Helpers.java index 9f49fc4..21d13ed 100644 --- a/core/test/ch/asynk/tankontank/Helpers.java +++ b/core/test/ch/asynk/tankontank/Helpers.java @@ -9,7 +9,7 @@ import ch.asynk.tankontank.engine.Tile; import ch.asynk.tankontank.engine.Board; import ch.asynk.tankontank.engine.Orientation; import ch.asynk.tankontank.engine.SearchBoard; -import ch.asynk.tankontank.engine.PossiblePaths; +import ch.asynk.tankontank.engine.PathBuilder; public class Helpers { @@ -95,7 +95,7 @@ public class Helpers { public FakePawn pawn; public FakeTile fakeTiles[]; - public PossiblePaths possiblePaths; + public PathBuilder pathBuilder; public FakeBoard(int cols, int rows, int mvt) { @@ -117,7 +117,7 @@ public class Helpers fakeTiles[108 - 2].offMap = true; pawn = new FakePawn(mvt); - possiblePaths = new PossiblePaths(this, 10, 20, 5, 10); + pathBuilder = new PathBuilder(this, 10, 20, 5, 10); } @Override @@ -129,15 +129,15 @@ public class Helpers return fakeTiles[i]; } - public int buildPossiblePaths(int x0, int y0, int x1, int y1) + public int buildPathBuilder(int x0, int y0, int x1, int y1) { - possiblePaths.init(pawn, getTile(x0, y0)); - return possiblePaths.build(getTile(x1, y1)); + pathBuilder.init(pawn, getTile(x0, y0)); + return pathBuilder.build(getTile(x1, y1)); } public int togglePoint(int x, int y) { - return possiblePaths.toggleCtrlTile(getTile(x, y)); + return pathBuilder.toggleCtrlTile(getTile(x, y)); } } } |