From 0524475fc01528994a789528717722e8d48f54f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 13 Nov 2014 23:44:30 +0100 Subject: Player: add boolean deploymentDone, deploymentDone() --- core/src/ch/asynk/tankontank/game/Player.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(); -- cgit v1.1-2-g2b99