summaryrefslogtreecommitdiffstats
path: root/core/test/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-10-29 11:16:36 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-10-29 11:16:36 +0100
commit216d00c208a636ad4b1797d57298a67e8cb31b66 (patch)
tree2616d6c0926833ec7befa78e2f00d1aa10b06f5f /core/test/ch/asynk/rustanddust
parentdf8c2d51671bce19cf0c0aa5a8f7cbfd433aeb80 (diff)
downloadRustAndDust-216d00c208a636ad4b1797d57298a67e8cb31b66.zip
RustAndDust-216d00c208a636ad4b1797d57298a67e8cb31b66.tar.gz
Tests: Pawn.mvt is statically set to 3
Diffstat (limited to 'core/test/ch/asynk/rustanddust')
-rw-r--r--core/test/ch/asynk/rustanddust/BoardUtils.java2
-rw-r--r--core/test/ch/asynk/rustanddust/Helpers.java12
-rw-r--r--core/test/ch/asynk/rustanddust/LineOfSightTest.java2
3 files changed, 6 insertions, 10 deletions
diff --git a/core/test/ch/asynk/rustanddust/BoardUtils.java b/core/test/ch/asynk/rustanddust/BoardUtils.java
index a0b5a1b..67eee93 100644
--- a/core/test/ch/asynk/rustanddust/BoardUtils.java
+++ b/core/test/ch/asynk/rustanddust/BoardUtils.java
@@ -23,7 +23,7 @@ public class BoardUtils
int cols = 10;
int rows = 9;
int mvt = 3;
- b = new Helpers.FakeBoard(cols, rows, 3);
+ b = new Helpers.FakeBoard(cols, rows);
sb = new Helpers.FakeSearchBoard(b, cols, rows);
}
diff --git a/core/test/ch/asynk/rustanddust/Helpers.java b/core/test/ch/asynk/rustanddust/Helpers.java
index f75e75e..c239fcf 100644
--- a/core/test/ch/asynk/rustanddust/Helpers.java
+++ b/core/test/ch/asynk/rustanddust/Helpers.java
@@ -15,13 +15,9 @@ public class Helpers
{
public static class FakePawn extends Pawn
{
- private int mvt;
- public FakePawn (int mvt)
- {
- this.mvt = mvt;
- }
+ public FakePawn () {}
- @Override public int getMovementPoints() { return mvt; }
+ @Override public int getMovementPoints() { return 3; }
@Override public int getRoadMarchBonus() { return 1; }
@Override public int getAngleOfAttack() { return 0; }
@Override public int getFlankSides() { return 0; }
@@ -104,7 +100,7 @@ public class Helpers
public FakeTile fakeTiles[];
public PathBuilder pathBuilder;
- public FakeBoard(int cols, int rows, int mvt)
+ public FakeBoard(int cols, int rows)
{
super(cols, rows);
fakeTiles = new FakeTile[(cols + 2) * (rows + 2)];
@@ -123,7 +119,7 @@ public class Helpers
fakeTiles[ 84 - 2].offMap = true;
fakeTiles[108 - 2].offMap = true;
- pawn = new FakePawn(mvt);
+ pawn = new FakePawn();
pathBuilder = new PathBuilder(this, 10, 20, 5, 10);
}
diff --git a/core/test/ch/asynk/rustanddust/LineOfSightTest.java b/core/test/ch/asynk/rustanddust/LineOfSightTest.java
index 45363ae..86a85df 100644
--- a/core/test/ch/asynk/rustanddust/LineOfSightTest.java
+++ b/core/test/ch/asynk/rustanddust/LineOfSightTest.java
@@ -19,7 +19,7 @@ public class LineOfSightTest
{
int cols = 10;
int rows = 9;
- fakeBoard = new Helpers.FakeBoard(cols, rows, 0);
+ fakeBoard = new Helpers.FakeBoard(cols, rows);
sb = new Helpers.FakeSearchBoard(fakeBoard, cols, rows);
}