diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-21 16:27:55 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-21 16:27:55 +0200 |
commit | 461313f5798d31bbac4738d7ea85a9772f48fd94 (patch) | |
tree | 7a57739e46f8f9130f7b3bb26b6f5d3f082e9885 /core/src/ch/asynk/tankontank/game | |
parent | 360980858735e071fdc1d67077a9f783fa8c6527 (diff) | |
download | RustAndDust-461313f5798d31bbac4738d7ea85a9772f48fd94.zip RustAndDust-461313f5798d31bbac4738d7ea85a9772f48fd94.tar.gz |
StateRotate: cantel does not revert all moves, a move done is done
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateRotate.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java index 4939fb0..37958ad 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java +++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java @@ -14,7 +14,6 @@ public class StateRotate extends StateCommon { this.rotateOnly = rotateOnly; - // if ((map.activablePawnsCount() + map.activatedPawnsCount()) == 1) ctrl.hud.show(false, true, false, false, false, ctrl.cfg.canCancel); ctrl.hud.rotateBtn.setOn(); @@ -45,8 +44,6 @@ public class StateRotate extends StateCommon map.showFinalPath(to, false); map.showDirections(to, false); map.showOrientation(to, false, o); - to.set(-1, -1); - from.set(-1, -1); } @Override @@ -76,10 +73,13 @@ public class StateRotate extends StateCommon @Override public void abort() { - hideAssists(); - ctrl.setAnimationCount(map.activatedPawnsCount()); - map.revertMoves(); - super.abort(); + ctrl.hud.hide(); + if (map.activatedPawnsCount() == 0) { + hideAssists(); + super.abort(); + } else { + ctrl.setState(StateType.MOVE, false); + } } @Override |