summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-23 20:41:23 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-23 20:41:23 +0200
commit37b44d0bbd370e3b71792759c43138e476cb871b (patch)
treea88b4f58672fb6b09d68b7a57f52b45d84e0b84d /core/src/ch/asynk/tankontank/game
parent7d697e2d13efebdaa569b22e3f668924aef2701d (diff)
downloadRustAndDust-37b44d0bbd370e3b71792759c43138e476cb871b.zip
RustAndDust-37b44d0bbd370e3b71792759c43138e476cb871b.tar.gz
add Hex.OFFMAP
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/MapA.java5
3 files changed, 8 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index a68aa75..404f763 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -9,6 +9,8 @@ public class Hex extends Tile
{
public enum Terrain
{
+ OFFMAP,
+ BLOCKED,
CLEAR,
HILLS,
WOODS,
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index bb41af3..c15dce5 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -26,7 +26,7 @@ public abstract class Map extends Board
protected Hex getHex(int col, int row)
{
- return (Hex) board[row][col];
+ return (Hex) getTile(col, row);
}
public boolean drag(float dx, float dy)
diff --git a/core/src/ch/asynk/tankontank/game/MapA.java b/core/src/ch/asynk/tankontank/game/MapA.java
index bef711d..54a1dfb 100644
--- a/core/src/ch/asynk/tankontank/game/MapA.java
+++ b/core/src/ch/asynk/tankontank/game/MapA.java
@@ -35,6 +35,11 @@ public class MapA extends Map
getHex(1, 6).terrain = Hex.Terrain.TOWN;
getHex(3, 7).terrain = Hex.Terrain.TOWN;
+ getHex(9, 1).terrain = Hex.Terrain.OFFMAP;
+ getHex(9, 3).terrain = Hex.Terrain.OFFMAP;
+ getHex(9, 5).terrain = Hex.Terrain.OFFMAP;
+ getHex(9, 7).terrain = Hex.Terrain.OFFMAP;
+
int N = Map.Orientation.NORTH.s;
int S = Map.Orientation.SOUTH.s;
int NE = Map.Orientation.NORTH_EAST.s;