diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Battle.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/battles/BattleCommon.java | 9 |
3 files changed, 5 insertions, 12 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java index 8bc1642..13e3162 100644 --- a/core/src/ch/asynk/tankontank/game/Battle.java +++ b/core/src/ch/asynk/tankontank/game/Battle.java @@ -11,9 +11,7 @@ public interface Battle public String getDescription(); - public Player getFirstPlayer(); - - public Player getSecondPlayer(); + public Player getPlayer(boolean first, boolean deploymentPhase); public Map getMap(); diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 6889342..f2d7283 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -53,8 +53,8 @@ public class Ctrl implements Disposable this.cfg = game.config; game.ctrl = this; - this.player = battle.getFirstPlayer(); - this.opponent = battle.getSecondPlayer(); + this.player = battle.getPlayer(true, false); + this.opponent = battle.getPlayer(false, false); this.map = battle.getMap(); battle.setup(map, player, opponent); diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java index 4893411..49e9d8d 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java @@ -56,14 +56,9 @@ public abstract class BattleCommon implements Battle } } - public Player getFirstPlayer() + public Player getPlayer(boolean first, boolean deploymentPhase) { - return factory.getPlayer(firstArmy); - } - - public Player getSecondPlayer() - { - return factory.getPlayer(secondArmy); + return factory.getPlayer((first ? firstArmy : secondArmy)); } public EntryPoint getEntryPoint(Unit unit) |