From be8c714f2f8404ad2c951e78e211146cfe64d933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 9 Dec 2015 22:39:19 +0100 Subject: Ctrl: code reorder --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 56 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 383417b..8896101 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -153,6 +153,34 @@ public class Ctrl implements Disposable } } + public void endDeployment() + { + setState(StateType.DONE); + turnDone(); + } + + public void endGame() + { + game.switchToMenu(); + } + + public void endPlayerTurn(boolean abort) + { + if (abort) + state.abort(); + turnDone(); + } + + public void exitBoard(boolean doit) + { + if (doit) + setState(StateType.DONE); + else + setState(StateType.ABORT); + } + + // + private void turnDone() { if (battle.turnDone()) @@ -276,32 +304,4 @@ public class Ctrl implements Disposable else if (this.stateType == StateType.REINFORCEMENT) setState(StateType.SELECT); } - - // Hud callbacks - - public void endDeployment() - { - setState(StateType.DONE); - turnDone(); - } - - public void endGame() - { - game.switchToMenu(); - } - - public void endPlayerTurn(boolean abort) - { - if (abort) - state.abort(); - turnDone(); - } - - public void exitBoard(boolean doit) - { - if (doit) - setState(StateType.DONE); - else - setState(StateType.ABORT); - } } -- cgit v1.1-2-g2b99