diff options
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateReplay.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateReplay.java b/core/src/ch/asynk/rustanddust/game/states/StateReplay.java index 19c9e42..013ca65 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateReplay.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateReplay.java @@ -23,9 +23,11 @@ public class StateReplay extends StateCommon private void setup() { + int s = order.activable.size(); + switch (order.type) { case MOVE: - selectedUnit = order.activable.get(order.activable.size() - 1); + selectedUnit = ((s > 0) ? order.activable.get(s - 1) : order.unit); break; case ENGAGE: to = order.engagement.defender.getHex(); |