summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-06 17:19:47 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-06 17:19:47 +0200
commit0e85fe19af33870fa9ecede68e7291544c6acb37 (patch)
treee5cd544bc69a1ad427b2c5bd201f74851d16b9c5 /core/src/ch/asynk/tankontank
parent3e046e9b05ffc844c69a10bbdfc3e6bf91e4e9e2 (diff)
downloadRustAndDust-0e85fe19af33870fa9ecede68e7291544c6acb37.zip
RustAndDust-0e85fe19af33870fa9ecede68e7291544c6acb37.tar.gz
GameStateRotate: use current selectet pawn if one
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateMove.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/states/GameStateRotate.java11
2 files changed, 11 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 2e05e89..f99dc75 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java
@@ -14,6 +14,7 @@ public class GameStateMove extends GameStateCommon
map.enablePossibleTargets(false);
map.enablePossiblePaths(false, false);
if (pawn != null) {
+ // FIXME must be one of it's own
skipFirst = false;
map.clearPossiblePaths();
map.buildAndShowPossibleMoves(pawn, hex);
diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
index 0a24b35..14fd2a8 100644
--- a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java
@@ -5,12 +5,21 @@ import ch.asynk.tankontank.engine.Orientation;
public class GameStateRotate extends GameStateCommon
{
@Override
+ public void enter()
+ {
+ map.hidePossibles();
+ if (pawn != null) {
+ // FIXME must be one of it's own
+ map.enableDirections(hex, true);
+ }
+ }
+
+ @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();
map.enableDirections(hex, true);