diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-07 15:50:04 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-07 15:50:04 +0100 |
commit | 7888d89f5c3075e4bb731549a7ec8dc195b77a73 (patch) | |
tree | c31bb400b9dca1ca3d338d9eabc18f81b334dd0e /core | |
parent | 841299b0181dd407b718f8b1a921cc9f563a1f1e (diff) | |
download | RustAndDust-7888d89f5c3075e4bb731549a7ec8dc195b77a73.zip RustAndDust-7888d89f5c3075e4bb731549a7ec8dc195b77a73.tar.gz |
Map: remove useless brackets
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(); } |