diff options
Diffstat (limited to 'core/src')
5 files changed, 12 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/GameState.java b/core/src/ch/asynk/tankontank/game/GameState.java index 428446d..23b4ffd 100644 --- a/core/src/ch/asynk/tankontank/game/GameState.java +++ b/core/src/ch/asynk/tankontank/game/GameState.java @@ -9,7 +9,7 @@ public interface GameState ANIMATION }; - public void enter(boolean normal); + public void enter(boolean flag); public void leave(); diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateAnimation.java b/core/src/ch/asynk/tankontank/game/states/GameStateAnimation.java index a40f431..820929a 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateAnimation.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateAnimation.java @@ -3,7 +3,7 @@ package ch.asynk.tankontank.game.states; public class GameStateAnimation extends GameStateCommon { @Override - public void enter(boolean normal) + public void enter(boolean flag) { } diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java index 7a953e3..0c12ef1 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateMove.java @@ -5,11 +5,11 @@ import com.badlogic.gdx.math.GridPoint2; public class GameStateMove extends GameStateCommon { @Override - public void enter(boolean normal) + public void enter(boolean fromSelect) { map.clearPossiblePaths(); - if (normal) { + if (fromSelect) { from.set(hex); activePawn = pawn; map.buildAndShowMovesAndAssits(activePawn, from); diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java index 5fc74af..356b73b 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateRotate.java @@ -10,10 +10,15 @@ public class GameStateRotate extends GameStateCommon private Orientation o = Orientation.KEEP; @Override - public void enter(boolean normal) + public void enter(boolean hasFinalMove) { - if (!normal) + if (!hasFinalMove) { to.set(-1, -1); + if (from.x == -1) { + from.set(hex); + activePawn = pawn; + } + } rotateOnly = (to.x == -1); diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java b/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java index 28ef39b..2f15ed8 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateSelect.java @@ -11,7 +11,7 @@ public class GameStateSelect extends GameStateCommon } @Override - public void enter(boolean normal) + public void enter(boolean flag) { ctrl.hud.hide(); } |