diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Map.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Map.java b/core/src/ch/asynk/rustanddust/game/Map.java index 24e694f..60c445b 100644 --- a/core/src/ch/asynk/rustanddust/game/Map.java +++ b/core/src/ch/asynk/rustanddust/game/Map.java @@ -192,13 +192,14 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS public int collectMoveableUnits(Unit unit) { - if (unit.canHQMove()) { - collectMoveAssists(unit, moveableUnits.asPawns()); - } else { + if (unit.canHQMove()) + collectMoveAssists(unit, moveableUnits.asPawns()); + else moveableUnits.clear(); - } + if (unit.canMove()) moveableUnits.add(unit); + return moveableUnits.size(); } |