summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-12 12:17:17 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-12 12:17:17 +0200
commit0409b4a2e5aba2a81f6fa59ded5f29c2475f5c5d (patch)
tree414cf62724d7b3aa1cb7ecdeae004e007304aef9
parent474c8fcce19bf7be821bf3f3411027fed5a9a867 (diff)
downloadRustAndDust-0409b4a2e5aba2a81f6fa59ded5f29c2475f5c5d.zip
RustAndDust-0409b4a2e5aba2a81f6fa59ded5f29c2475f5c5d.tar.gz
add chosen direction overlay when must check
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java4
3 files changed, 9 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index 35bef9a..d61d601 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -27,6 +27,7 @@ public class Hex extends Tile
public static final int MOVE2 = 4;
public static final int DIRECTIONS = 5;
public static final int ASSIST = 6;
+ public static final int ORIENTATION = 7;
public Terrain terrain;
public int roads;
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 7c1bdbe..3178aca 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -144,6 +144,11 @@ public abstract class Map extends Board
enableOverlayOn(hex, Hex.DIRECTIONS, enable);
}
+ public void showOrientation(GridPoint2 hex, boolean enable, Orientation o)
+ {
+ enableOverlayOn(hex, Hex.ORIENTATION, enable, o);
+ }
+
public int possiblePathsSize()
{
return possiblePaths.size();
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index f692ed0..431c5a1 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -44,6 +44,7 @@ public class StateRotate extends StateCommon
unselectHex(from);
map.showFinalPath(to, false);
map.showDirections(to, false);
+ map.showOrientation(to, false, o);
to.set(-1, -1);
from.set(-1, -1);
}
@@ -65,7 +66,8 @@ public class StateRotate extends StateCommon
rotationSet = true;
if (ctrl.cfg.mustValidate) {
- // TODO show overlay
+ map.showDirections(to, false);
+ map.showOrientation(to, true, o);
ctrl.hud.show(true, false, false, true, ctrl.cfg.canCancel);
} else
doRotation(o);