summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-31 09:07:13 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-31 09:07:13 +0100
commitd7e6c5933fe2c02eb54324ad6cec90992e999766 (patch)
treef212d7f0ab3c1119adc2bd867a855ffce986a611 /core/src/ch/asynk/rustanddust
parent26a607e23671227861febdf8fa3e04ce9e3fa7c2 (diff)
downloadRustAndDust-d7e6c5933fe2c02eb54324ad6cec90992e999766.zip
RustAndDust-d7e6c5933fe2c02eb54324ad6cec90992e999766.tar.gz
Ctrl: remove checkDeploymentDone()
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java8
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateDeployment.java8
2 files changed, 3 insertions, 13 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 36aa96f..4bedf83 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -146,14 +146,6 @@ public abstract class Ctrl implements Disposable
stateAfterAnimation = after;
}
- public boolean checkDeploymentDone()
- {
- boolean done = battle.isDeploymentDone();
- if (done)
- hud.askEndDeployment();
- return done;
- }
-
// Hud callbacks
public void endGame()
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
index 0afc4ee..1abac5a 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java
@@ -9,7 +9,6 @@ import ch.asynk.rustanddust.game.hud.ActionButtons.Buttons;
public class StateDeployment extends StateCommon
{
- private boolean completed;
private Zone entryZone;
private UnitList deployedUnits = new UnitList(10);
@@ -18,7 +17,6 @@ public class StateDeployment extends StateCommon
{
if (selectedHex != null)
map.hexUnselect(selectedHex);
- completed = false;
entryZone = null;
selectedHex = null;
selectedUnit = null;
@@ -60,7 +58,7 @@ public class StateDeployment extends StateCommon
showEntryZone(unit);
} else if (selectedUnit != null) {
deployUnit(Orientation.fromAdj(selectedHex, hex));
- } else if (!completed && (entryZone != null) && (hex != null)) {
+ } else if (!ctrl.battle.isDeploymentDone() && (entryZone != null) && (hex != null)) {
if (hex.isEmpty() && entryZone.contains(hex)) {
showUnit(activeUnit, hex);
}
@@ -125,7 +123,7 @@ public class StateDeployment extends StateCommon
map.hexDirectionsHide(selectedHex);
ctrl.hud.actionButtons.hide();
ctrl.hud.playerInfo.unitDock.show();
- if (ctrl.checkDeploymentDone())
- completed = true;
+ if (ctrl.battle.isDeploymentDone())
+ ctrl.hud.askEndDeployment();
}
}