diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 15:38:57 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 15:38:57 +0100 |
commit | 0b35e5b14cc58f87bab6364d236c141b82e03117 (patch) | |
tree | fec0d3283ac1f14bc7ad341279391ff5a5bf27c5 | |
parent | 7dc246851d138e2ce3dd8b23b35e7758894eb121 (diff) | |
download | RustAndDust-0b35e5b14cc58f87bab6364d236c141b82e03117.zip RustAndDust-0b35e5b14cc58f87bab6364d236c141b82e03117.tar.gz |
Map: add void showOnBoard(Unit, Hex, Orientation) to preview unit position on board
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 625f0f2..cc60e81 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -332,6 +332,16 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS // STATES ENTRY -> + public void showOnBoard(Unit unit, Hex to, Orientation o) + { + setPawnOnto(unit, to, o); + } + + public boolean setOnBoard(Unit unit, Hex to, Orientation entry) + { + return (process(unit, Move.getSet(unit, to, entry)) == 1); + } + public boolean enterBoard(Unit unit, Hex to, int allowedMoves) { Orientation entry = findBestEntry(unit, to, allowedMoves); @@ -341,11 +351,6 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS return (process(unit, Move.getEnter(unit, to, entry)) == 1); } - public boolean setOnBoard(Unit unit, Hex to, Orientation entry) - { - return (process(unit, Move.getSet(unit, to, entry)) == 1); - } - public int exitBoard(Unit unit) { return process(unit, pathBuilder.getExitMove()); |