diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StatePromote.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StatePromote.java b/core/src/ch/asynk/tankontank/game/states/StatePromote.java index cf628d9..3d83ec3 100644 --- a/core/src/ch/asynk/tankontank/game/states/StatePromote.java +++ b/core/src/ch/asynk/tankontank/game/states/StatePromote.java @@ -8,19 +8,18 @@ public class StatePromote extends StateCommon public void enter(StateType prevState) { ctrl.hud.actionButtons.hide(); - Unit unit = ctrl.player.promote(selectedUnit); - if (unit != null) { - // TODO this must burn 1 AP down !!!!! - ctrl.hud.notify(unit + " has been promoted"); - selectedUnit.promote(); - unit.degrade(); + String str = selectedUnit.toString(); + if (ctrl.player.promote(selectedUnit)) { + map.activatedPawns.add(selectedUnit); + ctrl.hud.notify(str+ " has been promoted"); } - done(); + ctrl.setState(StateType.DONE); } @Override public void leave(StateType nextState) { + map.unselectHex(selectedHex); } @Override |