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.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 3418d56..b7ee78e 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -57,6 +57,18 @@ public abstract class Map extends Board
}
}
+ public void showMoves(float x, float y)
+ {
+ for(GridPoint2 hex : areaPoints)
+ enableOverlayOn(hex.x, hex.y, Hex.GREEN, false);
+
+ getHexAt(currentHex, x, y);
+ Pawn pawn = getTopPawnAt(currentHex);
+ if (pawn == null) return;
+ for(GridPoint2 hex : reachableFrom(pawn, currentHex.x, currentHex.y))
+ enableOverlayOn(hex.x, hex.y, Hex.GREEN, true);
+ }
+
private void debugMap()
{
int o = Hex.FOG;