From 79b4811452f6a53509e6ffe5b1f6e4f266c4a8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 28 Nov 2014 18:33:59 +0100 Subject: StateRotate: self select -> ABORT --- core/src/ch/asynk/tankontank/game/states/StateRotate.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java index aa427ab..8b53221 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java +++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java @@ -82,6 +82,11 @@ public class StateRotate extends StateCommon @Override public void touchUp() { + if (upHex == activeUnit.getHex()) { + ctrl.setState(StateType.ABORT); + return; + } + if (rotationSet) return; o = Orientation.fromAdj(to, upHex); -- cgit v1.1-2-g2b99