summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/Tile.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
3 files changed, 7 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java
index 1c767fe..735af0e 100644
--- a/core/src/ch/asynk/tankontank/engine/Tile.java
+++ b/core/src/ch/asynk/tankontank/engine/Tile.java
@@ -11,6 +11,7 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector2;
+import ch.asynk.tankontank.engine.Board;
import ch.asynk.tankontank.engine.gfx.Drawable;
import ch.asynk.tankontank.engine.gfx.StackedImages;
@@ -23,7 +24,7 @@ public abstract class Tile implements Drawable, Disposable
private StackedImages overlays;
private ArrayDeque<Pawn> stack;
- public abstract int defenseFor(Pawn target, List<Pawn> foes);
+ public abstract int defenseFor(Pawn target, Board.PawnCollection foes);
public abstract int costFrom(Pawn pawn, Orientation side, boolean road);
public abstract boolean isOffMap();
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index b357e56..45d3d43 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -5,6 +5,7 @@ import java.util.Iterator;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
+import ch.asynk.tankontank.engine.Board;
import ch.asynk.tankontank.engine.Pawn;
import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.Orientation;
@@ -109,7 +110,7 @@ public class Hex extends Tile
}
@Override
- public int defenseFor(Pawn target, List<Pawn> foes)
+ public int defenseFor(Pawn target, Board.PawnCollection foes)
{
Unit u = (Unit) target;
boolean terrainBonus = true;
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 4f876b0..ce587a1 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -1,6 +1,5 @@
package ch.asynk.tankontank.game;
-import java.util.ArrayList;
import java.util.Iterator;
import com.badlogic.gdx.assets.AssetManager;
@@ -28,7 +27,7 @@ public abstract class Map extends Board
public final Board.PawnCollection moveablePawns;
public final Board.PawnCollection possibleTargets;
public final Board.PawnCollection attackAssists;
- public final ArrayList<Pawn> activatedPawns = new ArrayList<Pawn>(7);
+ public final Board.PawnCollection activatedPawns;
private final SpriteAnimation explosion;
private final SpriteAnimation explosions;
@@ -49,6 +48,8 @@ public abstract class Map extends Board
possibleTargets = new PawnSet(this, 10);
attackAssists = new PawnSet(this, 6);
+
+ activatedPawns = new PawnSet(this, 7);
}
@Override