diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-24 16:05:03 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-24 16:05:03 +0200 |
commit | 45cd3556d32e2ca11010e290486d6204b9149b3e (patch) | |
tree | 5ccfb726d60e5239770f3b05c4ba4b1c1e1eb424 /core/src | |
parent | 45c07ef8f9506320858140bb329c34d9edd10ec7 (diff) | |
download | RustAndDust-45cd3556d32e2ca11010e290486d6204b9149b3e.zip RustAndDust-45cd3556d32e2ca11010e290486d6204b9149b3e.tar.gz |
Tile.roadMarchBonus() -> Pawn.roadMarch()
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Tile.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 11 |
4 files changed, 11 insertions, 8 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 3d89676..8da9774 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -25,6 +25,7 @@ public abstract class Pawn extends Image implements Disposable private ArrayDeque<Vector3> path = new ArrayDeque<Vector3>(); public abstract int getMvt(); + public abstract int roadMarch(); public Pawn(TextureRegion region, TextureAtlas atlas) { diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java index d2bda78..f243460 100644 --- a/core/src/ch/asynk/tankontank/engine/Tile.java +++ b/core/src/ch/asynk/tankontank/engine/Tile.java @@ -17,7 +17,6 @@ public abstract class Tile implements BasicDrawable public abstract Tile getNewAt(float x, float y); public abstract boolean atLeastOneMove(Pawn pawn); - public abstract int roadMarchBonus(Pawn pawn); public abstract boolean road(Board.Orientation side); public abstract int costFrom(Pawn pawn, Board.Orientation side, boolean road); diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 6666e9a..161ed44 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -53,12 +53,6 @@ public class Hex extends Tile } @Override - public int roadMarchBonus(Pawn pawn) - { - return 1; - } - - @Override public boolean road(Board.Orientation side) { return (side.s == (roads & side.s)); diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 4a9741a..40fb68d 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -16,7 +16,16 @@ public class Unit extends Pawn public Army army; @Override - public int getMvt() { return mp; } + public int getMvt() + { + return mp; + } + + @Override + public int roadMarch() + { + return 1; + } // hard tager public Unit(Army army, boolean hq, int range, int defense, int movementPoints, TextureRegion region, TextureAtlas atlas) |