diff options
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
4 files changed, 12 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 8b51867..6a49de2 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -46,6 +46,9 @@ public abstract class Ctrl implements Disposable private StateType stateType; private StateType stateAfterAnimation; + public abstract void init(); + protected abstract void processTurn(); + public static Ctrl getCtrl(final RustAndDust game) { Ctrl ctrl = null; diff --git a/core/src/ch/asynk/rustanddust/game/Map.java b/core/src/ch/asynk/rustanddust/game/Map.java index 2386f5d..2208448 100644 --- a/core/src/ch/asynk/rustanddust/game/Map.java +++ b/core/src/ch/asynk/rustanddust/game/Map.java @@ -36,9 +36,8 @@ public abstract class Map extends Map4Orders public void turnDone() { - RustAndDust.debug("TurnDone", String.format(" Processed Commands : %d", commandsSize())); - - // FIXME must emit the turn commands + RustAndDust.debug("TurnDone", String.format(" Processed Orders : %d", ordersSize())); + game.ctrl.processTurn(); ordersClear(); } diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java index f8ba8db..844b6cf 100644 --- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java @@ -101,6 +101,7 @@ public abstract class BattleCommon implements Battle this.gePlayer = factory.getPlayer(Army.GE); ctrl.hud.update(); + ctrl.init(); setupMap(); this.currentPlayer = this.usPlayer; diff --git a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java index b1ad673..4c71bc0 100644 --- a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java +++ b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java @@ -10,4 +10,10 @@ public class Solo extends Ctrl { super(game, battle); } + + @Override + public void init() { } + + @Override + protected void processTurn() { } } |