diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-23 19:36:37 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-23 19:36:37 +0200 |
commit | 7d697e2d13efebdaa569b22e3f668924aef2701d (patch) | |
tree | d308e9df5626a16683ae037494570e998fda9aa5 /core/src | |
parent | baeab696e7972cd02346fd8759e3fa8efe923b28 (diff) | |
download | RustAndDust-7d697e2d13efebdaa569b22e3f668924aef2701d.zip RustAndDust-7d697e2d13efebdaa569b22e3f668924aef2701d.tar.gz |
use Hex overlay constants in debug
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 19 |
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; |