summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java15
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateMove.java2
2 files changed, 6 insertions, 11 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 56b5db9..ab8e83c 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -21,11 +21,11 @@ public abstract class Map extends Board
{
private final Ctrl ctrl;
- public final HexList possibleMoves; // HexSet
- public final HexList possibleTargets; // PawnSet
- public final HexList possiblePaths; // class Move
- public final HexList moveAssists; // PawnSet
- public final HexList attackAssists; // PawnSet
+ public final Board.TileCollection possibleMoves;
+ public final Board.TileCollection possibleTargets;
+ public final Board.TileCollection possiblePaths;
+ public final Board.TileCollection moveAssists;
+ public final Board.TileCollection attackAssists;
public final ArrayList<Pawn> activablePawns = new ArrayList<Pawn>(7); // PawnSet
public final ArrayList<Pawn> activatedPawns = new ArrayList<Pawn>(7); // PawnSet
@@ -71,11 +71,6 @@ public abstract class Map extends Board
return (Hex) getTile(col, row);
}
- public Hex getFirstMoveAssist()
- {
- return (Hex) moveAssists.get(0);
- }
-
public void selectHex(Hex hex, boolean enable)
{
enableOverlayOn(hex, Hex.SELECT, enable);
diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java
index 7762c92..eb462db 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateMove.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java
@@ -25,7 +25,7 @@ public class StateMove extends StateCommon
} else {
// back from rotation -> use the above and unmodified activePawn
if ((activePawn == selectedPawn) || !selectedPawn.canMove()) {
- upHex = map.getFirstMoveAssist();
+ upHex = (Hex) map.moveAssists.first();
activePawn = upHex.getTopPawn();
} else {
upHex = selectedHex;