diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Battle.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/battles/BattleCommon.java | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java index 7bbd962..8625dd4 100644 --- a/core/src/ch/asynk/tankontank/game/Battle.java +++ b/core/src/ch/asynk/tankontank/game/Battle.java @@ -8,6 +8,8 @@ import ch.asynk.tankontank.ui.Position; public interface Battle { + public void init(); + public String getName(); public String getDescription(); diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 9947d87..63a372a 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -53,6 +53,8 @@ public class Ctrl implements Disposable this.cfg = game.config; game.ctrl = this; + battle.init(); + this.map = battle.getMap(); battle.setup(this, map); this.player = battle.getPlayer(); diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java index dd5cb6d..9be7403 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java @@ -33,6 +33,11 @@ public abstract class BattleCommon implements Battle public BattleCommon(Factory factory) { this.factory = factory; + } + + @Override + public void init() + { this.usPlayer = factory.getPlayer(Army.US); this.gePlayer = factory.getPlayer(Army.GE); } |