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.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java7
-rw-r--r--core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java7
4 files changed, 19 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Battle.java b/core/src/ch/asynk/tankontank/game/Battle.java
index 7e52632..6f38a21 100644
--- a/core/src/ch/asynk/tankontank/game/Battle.java
+++ b/core/src/ch/asynk/tankontank/game/Battle.java
@@ -17,6 +17,8 @@ public interface Battle
public Player checkVictory(Ctrl ctrl);
+ public boolean getReinforcement(Ctrl ctrl);
+
public EntryPoint getEntryPoint(Unit unit);
public Position getHudPosition(Player player);
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 77bc56f..16a6a57 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -121,8 +121,10 @@ public class Ctrl implements Disposable
private void startPlayerTurn()
{
player.turnStart();
- hud.update();
hud.notify(player.getName() + "'s turn", 2, Position.MIDDLE_CENTER, true);
+ if (battle.getReinforcement(this))
+ hud.notify("You have reinforcement", 2, Position.MIDDLE_CENTER, true);
+ hud.update();
setState(battle.getState(player));
}
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java b/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
index c4e760d..f31aff4 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleFrontalAssault.java
@@ -55,6 +55,13 @@ public class BattleFrontalAssault extends BattleCommon
return ((player.is(Army.GE) && (n == 4)));
}
+ @Override
+ public boolean getReinforcement(Ctrl ctrl)
+ {
+ return false;
+ }
+
+ @Override
public Player checkVictory(Ctrl ctrl)
{
if (ctrl.opponent.unitsLeft() == 0)
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
index 8e9ed67..14efe77 100644
--- a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
+++ b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java
@@ -47,6 +47,13 @@ public class BattleHeadToHead extends BattleCommon
return StateType.SELECT;
}
+ @Override
+ public boolean getReinforcement(Ctrl ctrl)
+ {
+ return false;
+ }
+
+ @Override
public Player checkVictory(Ctrl ctrl)
{
if (ctrl.opponent.unitsLeft() == 0)