diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 22:19:34 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 22:19:34 +0100 |
commit | 0fbe2d7d1dd29762d48c06e7908df6d0b9029cd2 (patch) | |
tree | ad919efee93dcb62a98d2133816e1ab547b08b73 /core/src/ch | |
parent | 95016312a86c742e76f630aab2af5e64ceed327b (diff) | |
download | RustAndDust-0fbe2d7d1dd29762d48c06e7908df6d0b9029cd2.zip RustAndDust-0fbe2d7d1dd29762d48c06e7908df6d0b9029cd2.tar.gz |
Map: leaveBoard: removePawn and if entryMove: revert objectives, and reset unit
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 537a48f..398ded0 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -214,8 +214,11 @@ public abstract class Map extends Board public void leaveBoard(Unit unit) { Hex hex = unit.getHex(); - if (removePawn(unit) == 0) - objectives.unclaim(hex); + if (unit.movement.entryMove) { + objectives.revert(); + unit.reset(); + } + removePawn(unit); activatedUnits.add(unit); } |