diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-01 15:58:04 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-01 15:58:04 +0200 |
commit | 8db2d14a7b47faf36e002efe96fafb731ec0e7c5 (patch) | |
tree | 72992f94e8e7c01ed1d58378c3ea74f78fbcd9f1 /core/test | |
parent | 2a0b02c50c088f75dc33217d1b1d905e7dc78545 (diff) | |
download | RustAndDust-8db2d14a7b47faf36e002efe96fafb731ec0e7c5.zip RustAndDust-8db2d14a7b47faf36e002efe96fafb731ec0e7c5.tar.gz |
add tests for Board.possiblePathsFilterAdd(int, int, Set<GridPoint2>)
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/ch/asynk/tankontank/BoardUtils.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/test/ch/asynk/tankontank/BoardUtils.java b/core/test/ch/asynk/tankontank/BoardUtils.java index 21a65be..295d198 100644 --- a/core/test/ch/asynk/tankontank/BoardUtils.java +++ b/core/test/ch/asynk/tankontank/BoardUtils.java @@ -108,8 +108,17 @@ public class BoardUtils Helpers.FakePawn p = new Helpers.FakePawn(3); HashSet<GridPoint2> points = new HashSet<GridPoint2>(); - b.possiblePaths(p, 2, 2, 4, 3, points); + int n = b.possiblePaths(p, 2, 2, 4, 3, points); + assertTrue(n == 8); assertTrue(points.size() == 8); + + n = b.possiblePathsFilterAdd(3, 3, points); + assertTrue(n == 5); + assertTrue(points.size() == 6); + + n = b.possiblePathsFilterAdd(4, 4, points); + assertTrue(n == 1); + assertTrue(points.size() == 4); } @Test |