diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-13 12:08:45 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-13 12:08:45 +0200 |
commit | 24f64fb32ebd7dadbfbe19e097619b0496b4af79 (patch) | |
tree | 9626dc9e2d9573cdf9228da46331a89ad0d1f87a /core/src | |
parent | 522d25dd7c1cd9e1959b619d8d4ae20673190951 (diff) | |
download | RustAndDust-24f64fb32ebd7dadbfbe19e097619b0496b4af79.zip RustAndDust-24f64fb32ebd7dadbfbe19e097619b0496b4af79.tar.gz |
Map: buildAttackAssists(Pawn, GridPoint2, Iterator<Pawn>) -> feed activatedPawns and activablePawns
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 2e02185..5c50ea5 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -206,6 +206,9 @@ public abstract class Map extends Board public int buildAttackAssists(Pawn pawn, GridPoint2 hex, Iterator<Pawn> units) { buildAttackAssists(pawn, hex, units, attackAssists); + activatedPawns.add(pawn); + for (GridPoint2 p : attackAssists) + activablePawns.add(getTopPawnAt(p)); return attackAssists.size(); } |