diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-28 20:01:42 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-28 20:01:42 +0100 |
commit | 2d7e5754c85915800dfb5a206d642db4bb93bee5 (patch) | |
tree | e7aa051be5847698653d45a97fc0066fa4b28f3b /core/src/ch/asynk/tankontank/game/states | |
parent | d85ff81508cc5296bc20dcad4d0bf22cf8323854 (diff) | |
download | RustAndDust-2d7e5754c85915800dfb5a206d642db4bb93bee5.zip RustAndDust-2d7e5754c85915800dfb5a206d642db4bb93bee5.tar.gz |
StateMove: show DONE only when activatedUnits > 0
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateMove.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index d7d8dd6..32050a2 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -9,8 +9,9 @@ public class StateMove extends StateCommon @Override public void enter(StateType prevState) { - boolean moreThanOne = ((map.moveableUnits.size() + map.activatedUnits.size()) > 1); - ctrl.hud.actionButtons.show((moreThanOne ? Buttons.DONE.b : 0) | (ctrl.cfg.canCancel ? Buttons.ABORT.b : 0)); + ctrl.hud.actionButtons.show( + ((map.activatedUnits.size() > 0) ? Buttons.DONE.b : 0) + | (ctrl.cfg.canCancel ? Buttons.ABORT.b : 0)); if (prevState == StateType.ESCAPE) { if (map.possiblePaths.size() == 1) |