summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-06 12:23:37 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-06 12:23:37 +0100
commit8c7ebe2c56804b6a9fe24d087453b8682aee52f1 (patch)
tree30413550f1aa9b16295ea66b7537c66ffa80605b /core
parentcfe2a6055379bda9410031b09328f6a2f656d7c3 (diff)
downloadRustAndDust-8c7ebe2c56804b6a9fe24d087453b8682aee52f1.zip
RustAndDust-8c7ebe2c56804b6a9fe24d087453b8682aee52f1.tar.gz
StateSelect: unselect on touchUp before reselecting if appropriate
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
index 7573132..fa3711d 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
@@ -51,13 +51,14 @@ public class StateSelect extends StateCommon
@Override
public void touchDown()
{
- if (selectedHex != null)
- map.unselectHex(selectedHex);
}
@Override
public void touchUp()
{
+ if (selectedHex != null)
+ map.unselectHex(selectedHex);
+
if (!isEnemy) {
if (map.possibleMoves.contains(upHex)) {
// quick move