summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-13 12:08:45 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-13 12:08:45 +0200
commit24f64fb32ebd7dadbfbe19e097619b0496b4af79 (patch)
tree9626dc9e2d9573cdf9228da46331a89ad0d1f87a
parent522d25dd7c1cd9e1959b619d8d4ae20673190951 (diff)
downloadRustAndDust-24f64fb32ebd7dadbfbe19e097619b0496b4af79.zip
RustAndDust-24f64fb32ebd7dadbfbe19e097619b0496b4af79.tar.gz
Map: buildAttackAssists(Pawn, GridPoint2, Iterator<Pawn>) -> feed activatedPawns and activablePawns
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java3
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();
}