diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index c67d3d7..bef7422 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -82,19 +82,32 @@ public abstract class Map extends Board } } - public void showPossibleActions(Pawn pawn, GridPoint2 hex, boolean enable) + public void showPossibleMoves(Pawn pawn, GridPoint2 hex, boolean enable) { enablePossibleMoves(false); - enablePossibleTargets(false); if (enable) { possibleMovesFrom(pawn, hex, possibleMoves); enablePossibleMoves(true); + } + + } + + public void showPossibleTargets(Pawn pawn, GridPoint2 hex, boolean enable) + { + enablePossibleTargets(false); + if (enable) { possibleTargetsFrom(pawn, hex, possibleTargets); enablePossibleTargets(true); } } + public void showPossibleActions(Pawn pawn, GridPoint2 hex, boolean enable) + { + showPossibleMoves(pawn, hex, enable); + showPossibleTargets(pawn, hex, enable); + } + public int possiblePathsSize() { return possiblePaths.size(); @@ -144,6 +157,11 @@ public abstract class Map extends Board enableOverlayOn(hex, Hex.GREEN, false); enableOverlayOn(hex, Hex.MOVE, enable); } - enableOverlayOn(dst, Hex.ROSE, enable); + enableDirections(dst, enable); + } + + public void enableDirections(GridPoint2 hex, boolean enable) + { + enableOverlayOn(hex, Hex.ROSE, enable); } } |