diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateMove.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index 0300aed..3d3dbe0 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -56,7 +56,10 @@ public class StateMove extends StateCommon public StateType abort() { hideAssists(); - ctrl.setAnimationCount(map.activatedPawns.size()); + int n = map.activatedPawns.size(); + if (n == 0) + return StateType.ABORT; + ctrl.setAnimationCount(n); map.revertMoves(); if (activeUnit.movement.entryMove) { map.leaveBoard(activeUnit); |