summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-02 23:47:18 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-02 23:47:18 +0200
commitd7967cb6fc4b87989ea5222f9ee0ba73f71efee4 (patch)
tree79768a7d1061cefc347fbab177b50cc687739d34
parent342c6cf9f5681760d713e6a57a92b472f4761a95 (diff)
downloadRustAndDust-d7967cb6fc4b87989ea5222f9ee0ba73f71efee4.zip
RustAndDust-d7967cb6fc4b87989ea5222f9ee0ba73f71efee4.tar.gz
Map: nableFinalPath(boolean) -> enableFinalPath(GridPoint2, boolean)
-rw-r--r--core/src/ch/asynk/tankontank/game/GameStatePath.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java3
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);
}
}