From 350b658cc2469988040747cd17cbf370ed23946c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 29 Mar 2016 16:48:43 +0200 Subject: StateReplay: improve readability --- core/src/ch/asynk/rustanddust/game/states/StateReplay.java | 7 ++++--- 1 file 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; } -- cgit v1.1-2-g2b99