diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 17:19:47 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-06 17:19:47 +0200 |
commit | 0e85fe19af33870fa9ecede68e7291544c6acb37 (patch) | |
tree | e5cd544bc69a1ad427b2c5bd201f74851d16b9c5 /core/src/ch/asynk/tankontank/game/states | |
parent | 3e046e9b05ffc844c69a10bbdfc3e6bf91e4e9e2 (diff) | |
download | RustAndDust-0e85fe19af33870fa9ecede68e7291544c6acb37.zip RustAndDust-0e85fe19af33870fa9ecede68e7291544c6acb37.tar.gz |
GameStateRotate: use current selectet pawn if one
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateMove.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateRotate.java | 11 |
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); |