summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game/battles
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-25 12:59:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-27 22:26:28 +0100
commitea54afb0ce7fe12d5f96114d767244e7505a8a5c (patch)
tree6ae165ae965fba71addb6c72f1262b109f9f2057 /core/src/ch/asynk/rustanddust/game/battles
parentbab2b2f6d21d41e446342683d4351575b37d3f14 (diff)
downloadRustAndDust-ea54afb0ce7fe12d5f96114d767244e7505a8a5c.zip
RustAndDust-ea54afb0ce7fe12d5f96114d767244e7505a8a5c.tar.gz
Player: getTurnDone() + getCurrentTurn() -> getTurn(), turn is increased at turn start
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/battles')
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java4
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
index 844b6cf..be55d2e 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
@@ -133,7 +133,7 @@ public abstract class BattleCommon implements Battle
protected boolean turnDoneForBoth()
{
- return ((currentPlayer.getTurnDone() > 0) && (currentPlayer.getTurnDone() == getOpponent().getTurnDone()));
+ return ((currentPlayer.getTurn() > 0) && (currentPlayer.getTurn() == getOpponent().getTurn()));
}
protected Player getWinner(int minTurns)
@@ -146,7 +146,7 @@ public abstract class BattleCommon implements Battle
if (usPlayer.unitsLeft() == 0)
return gePlayer;
- if (gePlayer.getTurnDone() <= minTurns)
+ if (gePlayer.getTurn() <= minTurns)
return null;
usPlayer.objectivesWon = map.objectivesCount(Army.US);
diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleTest.java b/core/src/ch/asynk/rustanddust/game/battles/BattleTest.java
index c4888e1..f54ed43 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleTest.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleTest.java
@@ -44,7 +44,7 @@ public class BattleTest extends BattleCommon
{
if (currentPlayer.is(Army.GE))
return false;
- if (currentPlayer.getCurrentTurn() != 2)
+ if (currentPlayer.getTurn() != 2)
return false;
Zone usEntry = new Zone(map, 1);