summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 54d1a16..908007a 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -83,8 +83,8 @@ public abstract class Map extends Board
action = Action.PATH;
if (possiblePaths.size() > 0) {
enablePossiblePaths(false, true);
- paths = possiblePathsFilterAdd(touchHex.x, touchHex.y, possiblePaths);
- enableOverlayOn(touchHex.x, touchHex.y, Hex.DOT, true);
+ paths = possiblePathsFilterToggle(touchHex.x, touchHex.y, possiblePaths);
+ toggleDotOverlay(touchHex.x, touchHex.y);
} else {
enablePossibleMoves(false);
from.set(hex.x, hex.y);
@@ -144,6 +144,12 @@ public abstract class Map extends Board
enableOverlayOn(hex.x, hex.y, Hex.GREEN, enable);
}
+ private void toggleDotOverlay(int col, int row)
+ {
+ boolean enable= !isOverlayEnabledOn(col, row, Hex.DOT);
+ enableOverlayOn(col, row, Hex.DOT, enable);
+ }
+
private void enableFinalPath(boolean enable)
{
for(GridPoint2 hex : possiblePaths) {