summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-23 19:36:37 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-23 19:36:37 +0200
commit7d697e2d13efebdaa569b22e3f668924aef2701d (patch)
treed308e9df5626a16683ae037494570e998fda9aa5 /core/src/ch/asynk/tankontank
parentbaeab696e7972cd02346fd8759e3fa8efe923b28 (diff)
downloadRustAndDust-7d697e2d13efebdaa569b22e3f668924aef2701d.zip
RustAndDust-7d697e2d13efebdaa569b22e3f668924aef2701d.tar.gz
use Hex overlay constants in debug
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index dc93236..bb41af3 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -59,6 +59,7 @@ public abstract class Map extends Board
private void debugMap()
{
+ int o = Hex.FOG;
if (hexOn && (t == Hex.Terrain.CLEAR)) {
hexOn = false;
} else {
@@ -66,15 +67,19 @@ public abstract class Map extends Board
if (roadsOn) {
roadsOn = false;
t = Hex.Terrain.CLEAR;
- }
- else if (t == Hex.Terrain.CLEAR)
+ } else if (t == Hex.Terrain.CLEAR) {
+ o = Hex.GREEN;
t = Hex.Terrain.WOODS;
- else if (t == Hex.Terrain.WOODS)
+ } else if (t == Hex.Terrain.WOODS) {
+ o = Hex.BLUE;
t = Hex.Terrain.HILLS;
- else if (t == Hex.Terrain.HILLS)
+ } else if (t == Hex.Terrain.HILLS) {
+ o = Hex.RED;
t = Hex.Terrain.TOWN;
- else if (t == Hex.Terrain.TOWN)
+ } else if (t == Hex.Terrain.TOWN) {
+ o = Hex.FOG;
roadsOn = true;
+ }
}
boolean evenRow = true;
@@ -86,9 +91,9 @@ public abstract class Map extends Board
if (hexOn) {
if (roadsOn) {
if (hex.roads != 0)
- enableOverlayOn(i, j, 1, true);
+ enableOverlayOn(i, j, o, true);
} else if (hex.terrain == t)
- enableOverlayOn(i, j, 1, true);
+ enableOverlayOn(i, j, o, true);
}
}
evenRow = !evenRow;