diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-05 12:54:43 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-05 12:54:43 +0200 |
commit | 289d5150711e8b89be5caedeacb779ef277301c3 (patch) | |
tree | 9e0ccb4cee46a03e89492c4331b6877651680d02 /core/src/ch/asynk/tankontank/game | |
parent | 7ca4aa7b91179c635195ec0e3d749ced31e206be (diff) | |
download | RustAndDust-289d5150711e8b89be5caedeacb779ef277301c3.zip RustAndDust-289d5150711e8b89be5caedeacb779ef277301c3.tar.gz |
Board,Map: dispose clears all paths, and sets
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index eaa83df..0627e47 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -29,6 +29,14 @@ public abstract class Map extends Board setup(); } + @Override + public void dispose() + { + super.dispose(); + resetPaths(); + clearCoordinateVector(finalPath); + } + protected Hex getHex(int col, int row) { return (Hex) getTile(col, row); @@ -104,7 +112,7 @@ public abstract class Map extends Board public void movePawn(Pawn pawn, Orientation o) { - int s = getFinalPath(pawn, finalPath, o); + int s = getCoordinatePath(pawn, finalPath, o); if (s > 0) { movePawn(pawn, finalPath); } @@ -119,9 +127,9 @@ public abstract class Map extends Board public void resetPaths() { - clearNodesSet(possiblePaths); - clearNodesVector(possibleMoves); - clearNodesVector(possibleTargets); + clearPointSet(possiblePaths); + clearPointVector(possibleMoves); + clearPointVector(possibleTargets); } public void toggleDotOverlay(GridPoint2 hex) |