diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-12 23:10:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-12 23:10:21 +0100 |
commit | bf39f57fde946b323cc7ea22c2f057ad0eef3f35 (patch) | |
tree | 862c5a44e242023b908fa58cdf8488556d0970ec /core/src/ch/asynk/tankontank/game | |
parent | 39372b9ed6210ebca5264f277847dcca41f3cee3 (diff) | |
download | RustAndDust-bf39f57fde946b323cc7ea22c2f057ad0eef3f35.zip RustAndDust-bf39f57fde946b323cc7ea22c2f057ad0eef3f35.tar.gz |
Battle: add StateType getState(Player player)
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-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/BattleHeadToHead.java | 7 |
3 files changed, 11 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java index 507a13a..a9947c4 100644 --- a/core/src/ch/asynk/tankontank/game/Battle.java +++ b/core/src/ch/asynk/tankontank/game/Battle.java @@ -24,4 +24,6 @@ public interface Battle public EntryPoint getEntryPoint(Unit unit); public Position getHudPosition(Player player); + + public State.StateType getState(Player player); } diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 210e7e9..8ad40da 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -107,6 +107,7 @@ public class Ctrl implements Disposable private void nextPlayer() { + TankOnTank.debug("Ctrl", "next Player"); player.turnEnd(); Player winner = battle.checkVictory(this); if (winner != null) { @@ -118,6 +119,7 @@ public class Ctrl implements Disposable player.turnStart(); hud.playerInfo.update(player, battle.getHudPosition(player)); hud.notify(player.getName() + "'s turn"); + setState(battle.getState(player)); } private void checkTurnEnd() diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java index ae35df2..40465f5 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java @@ -9,6 +9,7 @@ import ch.asynk.tankontank.game.Map; import ch.asynk.tankontank.game.Hex; import ch.asynk.tankontank.game.Army; import ch.asynk.tankontank.game.Player; +import ch.asynk.tankontank.game.State.StateType; import ch.asynk.tankontank.game.Unit; import ch.asynk.tankontank.game.Unit.UnitId; import ch.asynk.tankontank.game.hud.Position; @@ -79,6 +80,12 @@ public class BattleHeadToHead extends BattleCommon } @Override + public StateType getState(Player player) + { + return StateType.SELECT; + } + + @Override public void setup(Map map, Player a, Player b) { Player gePlayer; |