summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-13 23:44:30 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-13 23:44:30 +0100
commit0524475fc01528994a789528717722e8d48f54f2 (patch)
tree3623fda2148767850e2648c7859282a59a545605 /core/src/ch/asynk
parent40363ea5a2e5fbc96569bc97fce0ca207f05f0e3 (diff)
downloadRustAndDust-0524475fc01528994a789528717722e8d48f54f2.zip
RustAndDust-0524475fc01528994a789528717722e8d48f54f2.tar.gz
Player: add boolean deploymentDone, deploymentDone()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Player.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Player.java b/core/src/ch/asynk/tankontank/game/Player.java
index f032124..fe450fa 100644
--- a/core/src/ch/asynk/tankontank/game/Player.java
+++ b/core/src/ch/asynk/tankontank/game/Player.java
@@ -14,6 +14,7 @@ public class Player extends ch.asynk.tankontank.engine.Player
private int turn;
private int apSpent;
private int actionPoints;
+ private boolean deploymentDone;
// stats
public int actionCount;
public int lostAttackCount;
@@ -23,7 +24,9 @@ public class Player extends ch.asynk.tankontank.engine.Player
{
super(army, n);
this.turn = 0;
+ this.apSpent = 0;
this.actionPoints = 0;
+ this.deploymentDone = false;
this.actionCount = 0;
this.lostAttackCount = 0;
this.wonAttackCount = 0;
@@ -55,6 +58,11 @@ public class Player extends ch.asynk.tankontank.engine.Player
return (apSpent == actionPoints);
}
+ public void deploymentDone()
+ {
+ deploymentDone = true;
+ }
+
public void burnDownOneAp()
{
apSpent += 1;
@@ -70,6 +78,8 @@ public class Player extends ch.asynk.tankontank.engine.Player
@Override
public void turnStart()
{
+ if (!deploymentDone)
+ return;
turn += 1;
for (Pawn pawn : units)
pawn.reset();