diff options
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Battle.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Battle.java b/core/src/ch/asynk/rustanddust/game/Battle.java index e8dd65a..baa27bb 100644 --- a/core/src/ch/asynk/rustanddust/game/Battle.java +++ b/core/src/ch/asynk/rustanddust/game/Battle.java @@ -23,6 +23,8 @@ public interface Battle public void init(Ctrl ctrl, int idA, int idB); + public void init(Ctrl ctrl, String payload); + public boolean actionDone(); public boolean turnDone(); diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java index 64d04f0..d744734 100644 --- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java @@ -128,6 +128,15 @@ public abstract class BattleCommon implements Battle } @Override + public void init(Ctrl ctrl, String payload) + { + ctrl.map = this.map = factory.getMap(getMapType()); + setupMap(); + map.load(payload, players); + currentPlayer = players[0]; + } + + @Override public boolean actionDone() { boolean burn = (map.unitsActivatedSize() > 0); |