summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java11
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateDeployment.java5
2 files changed, 5 insertions, 11 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 7b96ae5..6a6dad5 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -146,11 +146,6 @@ public abstract class Ctrl implements Disposable
stateAfterAnimation = after;
}
- public void unitDeployed()
- {
- battle.actionDone();
- }
-
// Hud callbacks
public void endGame()
@@ -166,7 +161,7 @@ public abstract class Ctrl implements Disposable
public void endDeployment()
{
- setState(StateType.DONE);
+ this.state.execute();
turnDone();
}
@@ -244,8 +239,10 @@ public abstract class Ctrl implements Disposable
private StateType completeDeployment()
{
+ if (battle.isDeploymentDone())
+ hud.askEndDeployment();
battle.actionDone();
- return this.state.execute();
+ return StateType.DEPLOYMENT;
}
private StateType abortAction()
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
index a209b87..97acf9e 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
@@ -123,9 +123,6 @@ public class StateDeployment extends StateCommon
map.hexDirectionsHide(selectedHex);
ctrl.hud.actionButtons.hide();
ctrl.hud.playerInfo.unitDock.show();
- if (ctrl.battle.isDeploymentDone())
- ctrl.hud.askEndDeployment();
- else
- ctrl.unitDeployed();
+ ctrl.setState(StateType.DONE);
}
}