summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Battle.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java7
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;