diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:14:35 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:14:35 +0100 |
commit | b9937afafd957346f8471f483bdde7e900093075 (patch) | |
tree | 4915f20aa268b5c7cc0ee82b5fbd49a9618dd966 /core/src/ch/asynk/tankontank/game | |
parent | e21ec55eb6d382fff6741abbb7e5bc192d5b700f (diff) | |
download | RustAndDust-b9937afafd957346f8471f483bdde7e900093075.zip RustAndDust-b9937afafd957346f8471f483bdde7e900093075.tar.gz |
Map: add enterBoard(Pawn, Hex, Orientation) and leaveBoard(Pawn)
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 66fa17c..351fd46 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -167,6 +167,19 @@ public abstract class Map extends Board // ACTIONS + public void enterBoard(Pawn pawn, Hex to, Orientation o) + { + Orientation entry = findBestEntry(pawn, to, o); + pawn.enterBoard(to, entry); + setPawnOnto(pawn, to, o); + } + + public void leaveBoard(Pawn pawn) + { + removePawn(pawn); + pawn.reset(); + } + public void promote(Pawn pawn, Pawn with) { removePawn(pawn); |