From d7967cb6fc4b87989ea5222f9ee0ba73f71efee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 2 Oct 2014 23:47:18 +0200 Subject: Map: nableFinalPath(boolean) -> enableFinalPath(GridPoint2, boolean) --- core/src/ch/asynk/tankontank/game/GameStatePath.java | 2 +- core/src/ch/asynk/tankontank/game/Map.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/GameStatePath.java b/core/src/ch/asynk/tankontank/game/GameStatePath.java index d7d5b4c..06f64a4 100644 --- a/core/src/ch/asynk/tankontank/game/GameStatePath.java +++ b/core/src/ch/asynk/tankontank/game/GameStatePath.java @@ -29,7 +29,7 @@ public class GameStatePath extends GameStateCommon } if (s == 1) { - map.enableFinalPath(true); + map.enableFinalPath(downHex, true); ctrl.setState(State.DIRECTION, true); } } diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 47fbff7..a7bfc59 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -115,12 +115,13 @@ public abstract class Map extends Board enableOverlayOn(hex, Hex.DOT, enable); } - public void enableFinalPath(boolean enable) + public void enableFinalPath(GridPoint2 dst, boolean enable) { for(GridPoint2 hex : possiblePaths) { enableOverlayOn(hex, Hex.GREEN, false); enableOverlayOn(hex, Hex.DOT, false); enableOverlayOn(hex, Hex.MOVE, enable); } + enableOverlayOn(dst, Hex.ROSE, true); } } -- cgit v1.1-2-g2b99