diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-15 17:00:09 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-15 17:00:09 +0100 |
commit | 4b3c560ae4356eef1b805202d0f100e4e12dce7e (patch) | |
tree | 184403506e273f160a7bf674773655f0b052a653 /core/src/ch/asynk/tankontank/game | |
parent | 7463f1416738fae157a4235deed3babea71751a5 (diff) | |
download | RustAndDust-4b3c560ae4356eef1b805202d0f100e4e12dce7e.zip RustAndDust-4b3c560ae4356eef1b805202d0f100e4e12dce7e.tar.gz |
Ctrl: actionDone() -> if next state is DONE burn down AP end check for end of turn
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index cc6f801..f430846 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -151,14 +151,16 @@ public class Ctrl implements Disposable { StateType nextState = this.state.done(); - if (map.activatedPawns.size() > 0) { - player.burnDownOneAp(); - hud.update(); + if (nextState == StateType.DONE) { + if (map.activatedPawns.size() > 0) { + TankOnTank.debug("burn down 1AP"); + player.burnDownOneAp(); + hud.update(); + } + if (player.apExhausted()) + hud.notifyEndOfTurn(); } - if (player.apExhausted()) - swicthPlayer(); - if (nextState == StateType.DONE) nextState = battle.getState(player); |