diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateDeployment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java index c3a333e..6129631 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java +++ b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java @@ -44,7 +44,8 @@ public class StateDeployment extends StateCommon @Override public StateType abort() { - undo(); + if (activeUnit != null) + undo(); return StateType.DEPLOYMENT; } @@ -73,8 +74,10 @@ public class StateDeployment extends StateCommon unitEnter(activeUnit); } else { unit = downHex.getUnit(); - if (deployedUnits.contains(unit)) + if (deployedUnits.contains(unit)) { showRotation(unit, downHex); + activeUnit = unit; + } } } |