summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateMove.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
index 2bdf52f..2e05e89 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
@@ -9,15 +9,27 @@ public class GameStateMove extends GameStateCommon
private GridPoint2 to = new GridPoint2(-1, -1);
@Override
+ public void enter()
+ {
+ map.enablePossibleTargets(false);
+ map.enablePossiblePaths(false, false);
+ if (pawn != null) {
+ skipFirst = false;
+ map.clearPossiblePaths();
+ map.buildAndShowPossibleMoves(pawn, hex);
+ }
+ }
+
+ @Override
public void touchDown()
{
if (pawn == null) {
super.touchDown();
if (hexHasUnit()) {
- // TODO maybe keep the the previous hex
// FIXME must be one of it's own
setPawn();
skipFirst = true;
+ map.clearPossiblePaths();
map.buildAndShowPossibleMoves(pawn, hex);
}
}