diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 34 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateAttack.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateMove.java | 2 |
3 files changed, 10 insertions, 30 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 44b6690..fed7db0 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -21,13 +21,13 @@ public abstract class Map extends Board { private final Ctrl ctrl; - private final HexList possibleMoves; // HexSet - private final HexList possibleTargets; // PawnSet - private final HexList possiblePaths; // class Move - private final HexList moveAssists; // PawnSet - private final HexList attackAssists; // PawnSet - private final ArrayList<Pawn> activablePawns = new ArrayList<Pawn>(7); // PawnSet - private final ArrayList<Pawn> activatedPawns = new ArrayList<Pawn>(7); // PawnSet + 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 ArrayList<Pawn> activablePawns = new ArrayList<Pawn>(7); // PawnSet + public final ArrayList<Pawn> activatedPawns = new ArrayList<Pawn>(7); // PawnSet private final SpriteAnimation explosion; private final SpriteAnimation explosions; @@ -66,26 +66,6 @@ public abstract class Map extends Board activatedPawns.clear(); } - public void clearPossiblePaths() - { - possiblePaths.clear(); - } - - public void clearPossibleTargets() - { - possibleTargets.clear(); - } - - public void clearActivablePawns() - { - activablePawns.clear(); - } - - public void clearActivatedPawns() - { - activatedPawns.clear(); - } - public Hex getHex(int col, int row) { return (Hex) getTile(col, row); diff --git a/core/src/ch/asynk/tankontank/game/states/StateAttack.java b/core/src/ch/asynk/tankontank/game/states/StateAttack.java index 5587a45..93431a1 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateAttack.java +++ b/core/src/ch/asynk/tankontank/game/states/StateAttack.java @@ -8,7 +8,7 @@ public class StateAttack extends StateCommon @Override public void enter(boolean fromSelect) { - map.clearPossibleTargets(); + map.possibleTargets.clear(); ctrl.hud.show(false, false, false, true, false, ctrl.cfg.canCancel); ctrl.hud.attackBtn.setOn(); @@ -71,7 +71,7 @@ public class StateAttack extends StateCommon @Override public void abort() { - map.clearActivatedPawns(); + map.activatedPawns.clear(); super.abort(); } diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index 87d80ba..e959376 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -8,7 +8,7 @@ public class StateMove extends StateCommon @Override public void enter(boolean fromSelect) { - map.clearPossiblePaths(); + map.possiblePaths.clear(); ctrl.hud.show(false, true, true, false, ((map.activablePawnsCount() + map.activatedPawnsCount()) > 1), ctrl.cfg.canCancel); ctrl.hud.moveBtn.setOn(); |