diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-10-29 17:42:29 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-10-29 17:42:29 +0100 |
commit | 532e986d8165f814f028c50edf7c8f53c941e12f (patch) | |
tree | 02dfaa363f52060afc074bc7ac737c0713e85515 /core/test | |
parent | f6829e0cf640248ec0de8c47f5224d7580da9bda (diff) | |
download | RustAndDust-532e986d8165f814f028c50edf7c8f53c941e12f.zip RustAndDust-532e986d8165f814f028c50edf7c8f53c941e12f.tar.gz |
tests: FakeTile inherits from HeadedPawn
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/ch/asynk/rustanddust/Helpers.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/test/ch/asynk/rustanddust/Helpers.java b/core/test/ch/asynk/rustanddust/Helpers.java index c239fcf..1f3878b 100644 --- a/core/test/ch/asynk/rustanddust/Helpers.java +++ b/core/test/ch/asynk/rustanddust/Helpers.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.HashSet; import ch.asynk.rustanddust.engine.Pawn; +import ch.asynk.rustanddust.engine.HeadedPawn; import ch.asynk.rustanddust.engine.Tile; import ch.asynk.rustanddust.engine.Board; import ch.asynk.rustanddust.engine.Orientation; @@ -13,14 +14,13 @@ import ch.asynk.rustanddust.engine.PathBuilder; public class Helpers { - public static class FakePawn extends Pawn + public static class FakePawn extends HeadedPawn { - public FakePawn () {} - @Override public int getMovementPoints() { return 3; } @Override public int getRoadMarchBonus() { return 1; } - @Override public int getAngleOfAttack() { return 0; } - @Override public int getFlankSides() { return 0; } + @Override public int getFlankSides() { return orientation.getBackSides(); } + @Override public int getAngleOfAttack() { return orientation.getFrontSides(); } + @Override public int getDefense(Tile tile) { return 8; } @Override public int getEngagementRangeFrom(Tile tile) { return 3; } @@ -43,6 +43,12 @@ public class Helpers @Override public void reset() { } @Override public void revertLastMove() { } + + @Override public float getWidth() { return 24.0f; } + @Override public float getHeight() { return 24.0f; } + @Override public void setPosition(float x, float y, float z) { } + + public void setOrientation(Orientation o) { this.orientation = o; } } public static class FakeTile extends Tile |