From 40c05597ad1b464fc4195b5403db609dca60269d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 10 May 2016 14:24:27 +0200 Subject: Ctrl: factorise code --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 39811d3..4059b13 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -433,18 +433,11 @@ public abstract class Ctrl implements Disposable map.prepareReplayLastTurn(); setState(StateType.REPLAY); this.stateAfterAnimation = StateType.REPLAY; - } else { - hud.notify("Replay Done", Position.MIDDLE_CENTER); - map.clearMarshalUnits(); - if (!synched) { - storeGameState(); - synched = true; - } - this.mode = Mode.PLAY; - checkPlayer(battle.getState()); + blockEvents = 0.5f; + return; } - blockEvents = 0.5f; - return; + nextState = null; + map.clearMarshalUnits(); } hud.notify("Replay Done", Position.MIDDLE_CENTER); this.mode = Mode.PLAY; -- cgit v1.1-2-g2b99