diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index bc44fd9..522b562 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -275,10 +275,7 @@ public abstract class Ctrl implements Disposable if (nextState == StateType.ABORT) nextState = abortAction(); else if (nextState == StateType.DONE) { - if (stateType == StateType.DEPLOYMENT) - nextState = completeDeployment(); - else - nextState = completeAction(); + nextState = complete(); } if (stateType == StateType.ANIMATION) { @@ -302,6 +299,18 @@ public abstract class Ctrl implements Disposable turnDone(); } + private StateType complete() + { + switch(stateType) { + case DEPLOYMENT: + return completeDeployment(); + case REPLAY: + return battle.getState(); + default: + return completeAction(); + } + } + private StateType completeDeployment() { if (battle.isDeploymentDone()) |