From 33772e0d572f7efb99731257f84b295d33b01dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 13 Oct 2014 09:59:31 +0200 Subject: Map: add showAttackAssists(), isInPossibleAttackAssists() --- core/src/ch/asynk/tankontank/game/Map.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index d98d1b5..31dbbf0 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -93,6 +93,11 @@ public abstract class Map extends Board return moveAssists.contains(hex); } + public boolean isInPossibleAttackAssists(GridPoint2 hex) + { + return attackAssists.contains(hex); + } + public boolean isInPossiblePaths(GridPoint2 hex) { return possiblePaths.contains(hex); @@ -115,6 +120,12 @@ public abstract class Map extends Board enableOverlayOn(hex, Hex.ASSIST, enable); } + public void showAttackAssists(boolean enable) + { + for(GridPoint2 hex : attackAssists) + enableOverlayOn(hex, Hex.ASSIST, enable); + } + public void showPossibleTargets(boolean enable) { for(GridPoint2 hex : possibleTargets) -- cgit v1.1-2-g2b99