summaryrefslogtreecommitdiffstats
path: root/core/test
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-03 09:16:04 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-03 09:16:04 +0200
commit8109afc3258da79a7d5f27b1c0eeaac667ab491e (patch)
treefe960148d48982d06540785de627089bd9a1a9e1 /core/test
parent350426130bd412ba2a4858b86195b881a8bf4852 (diff)
downloadRustAndDust-8109afc3258da79a7d5f27b1c0eeaac667ab491e.zip
RustAndDust-8109afc3258da79a7d5f27b1c0eeaac667ab491e.tar.gz
fix tests
Diffstat (limited to 'core/test')
-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