summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StatePromote.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StatePromote.java b/core/src/ch/asynk/tankontank/game/states/StatePromote.java
index 5a40f02..28fe2b5 100644
--- a/core/src/ch/asynk/tankontank/game/states/StatePromote.java
+++ b/core/src/ch/asynk/tankontank/game/states/StatePromote.java
@@ -8,10 +8,10 @@ public class StatePromote extends StateCommon
public void enter(boolean flag)
{
ctrl.hud.hide();
- Unit p = ctrl.player.promote(selectedUnit);
- if (p != null) {
- ctrl.hud.notify(p + " has been promoted");
- map.promote(selectedUnit, p);
+ Unit unit = ctrl.player.promote(selectedUnit);
+ if (unit != null) {
+ ctrl.hud.notify(unit + " has been promoted");
+ map.promote(selectedUnit, unit);
}
done();
}