summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-29 16:48:43 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-29 16:48:43 +0200
commit350b658cc2469988040747cd17cbf370ed23946c (patch)
tree9a3d2a7a81bb25efeb1eceeb4cc1070d5e6b4c8e /core
parent5278b42d55ed8fc0e65d2aec329ff139851e060a (diff)
downloadRustAndDust-350b658cc2469988040747cd17cbf370ed23946c.zip
RustAndDust-350b658cc2469988040747cd17cbf370ed23946c.tar.gz
StateReplay: improve readability
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateReplay.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateReplay.java b/core/src/ch/asynk/rustanddust/game/states/StateReplay.java
index 013ca65..74cd1b4 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateReplay.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateReplay.java
@@ -47,10 +47,10 @@ public class StateReplay extends StateCommon
private StateType nextState()
{
- StateType next = StateType.DONE;
-
if (map.unitsActivableSize() <= 0)
- return next;
+ return StateType.DONE;
+
+ StateType next = null;
switch (order.type) {
case MOVE:
@@ -60,6 +60,7 @@ public class StateReplay extends StateCommon
next = StateType.BREAK;
break;
default:
+ next = StateType.DONE;
break;
}