From 461313f5798d31bbac4738d7ea85a9772f48fd94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 21 Oct 2014 16:27:55 +0200 Subject: StateRotate: cantel does not revert all moves, a move done is done --- core/src/ch/asynk/tankontank/game/states/StateRotate.java | 14 +++++++------- 1 file 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 -- cgit v1.1-2-g2b99