From 24f64fb32ebd7dadbfbe19e097619b0496b4af79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 13 Oct 2014 12:08:45 +0200 Subject: Map: buildAttackAssists(Pawn, GridPoint2, Iterator) -> feed activatedPawns and activablePawns --- core/src/ch/asynk/tankontank/game/Map.java | 3 +++ 1 file changed, 3 insertions(+) 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 units) { buildAttackAssists(pawn, hex, units, attackAssists); + activatedPawns.add(pawn); + for (GridPoint2 p : attackAssists) + activablePawns.add(getTopPawnAt(p)); return attackAssists.size(); } -- cgit v1.1-2-g2b99