summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-03 16:18:50 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-03 16:18:50 +0100
commit684b01e756384fe62f9db91dab7e77216adf1a6a (patch)
tree302a03db870d4dcdc1b28d9d10127b7cbac90723
parent01d2262fe890444c4ea31ff77c2509275205d722 (diff)
downloadRustAndDust-684b01e756384fe62f9db91dab7e77216adf1a6a.zip
RustAndDust-684b01e756384fe62f9db91dab7e77216adf1a6a.tar.gz
BattleCommon: turnDone() calls map.turnDone() after processing
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java7
1 files changed, 4 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 354ba29..64d04f0 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
@@ -140,17 +140,18 @@ public abstract class BattleCommon implements Battle
@Override
public boolean turnDone()
{
- map.turnDone();
+ boolean ret = false;
currentPlayer.turnEnd();
Player winner = getWinner();
if (winner != null) {
currentPlayer = winner;
- return true;
+ ret = true;
} else {
currentPlayer = getOpponent();
currentPlayer.turnStart(getActionPoints());
- return false;
}
+ map.turnDone();
+ return ret;
}
protected boolean turnDoneForBoth()