diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
4 files changed, 4 insertions, 8 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java index 24e8b12..ee8d684 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java +++ b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java @@ -89,8 +89,7 @@ public class StateDeployment extends StateCommon { map.unselectHex(selectedHex); map.hideDirections(selectedHex); - map.exitBoard(selectedUnit); - ctrl.player.revertUnitEntry(selectedUnit); + map.revertEnter(activeUnit); activeUnit = null; selectedUnit = null; ctrl.hud.update(); diff --git a/core/src/ch/asynk/tankontank/game/states/StateEscape.java b/core/src/ch/asynk/tankontank/game/states/StateEscape.java index c6a0cf4..98e4a8b 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateEscape.java +++ b/core/src/ch/asynk/tankontank/game/states/StateEscape.java @@ -60,10 +60,9 @@ public class StateEscape extends StateCommon map.hidePossibleMoves(); map.unselectHex(unit.getHex()); - map.exitBoard(unit); ctrl.player.unitEscape(unit); - if (map.moveUnit(activeUnit) > 0) + if (map.exitBoard(unit) > 0) return StateType.MOVE; return StateType.DONE; } diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index c56971c..7f2767b 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -70,8 +70,7 @@ public class StateMove extends StateCommon { hideAssists(); if (activeUnit.justEntered()) { - map.exitBoard(activeUnit); - ctrl.player.revertUnitEntry(activeUnit); + map.revertEnter(activeUnit); return StateType.ABORT; } int n = map.activatedUnits.size(); diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java index c282733..4331d3d 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java +++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java @@ -55,8 +55,7 @@ public class StateRotate extends StateCommon StateType nextState = StateType.ABORT; ctrl.hud.actionButtons.hide(); if (activeUnit.justEntered()) { - map.exitBoard(activeUnit); - ctrl.player.revertUnitEntry(activeUnit); + map.revertEnter(activeUnit); nextState = StateType.ABORT; } else if (map.activatedUnits.size() == 0) { map.hideMoveableUnits(); |