diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-24 12:31:17 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-24 12:31:17 +0200 |
commit | 45c07ef8f9506320858140bb329c34d9edd10ec7 (patch) | |
tree | b2f7bcb61c5fc7957e79fcefc56c7a3b28fc6214 /core/src/ch/asynk/tankontank/game | |
parent | bc2944721af54bb05ccb3f402210818aac4632ca (diff) | |
download | RustAndDust-45c07ef8f9506320858140bb329c34d9edd10ec7.zip RustAndDust-45c07ef8f9506320858140bb329c34d9edd10ec7.tar.gz |
RIGHT click to show reachable
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 12 |
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; |