summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-10 11:18:28 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-10 11:18:28 +0100
commit7901668249d2f0d9669a170cf7bf429bce02c48f (patch)
tree58375a3f2aa5676d0f6a646c8b72d38e7f8d9f19 /core/src/ch/asynk
parenta114192ee535dd2a2ff36b94e3c12a101391c66e (diff)
downloadRustAndDust-7901668249d2f0d9669a170cf7bf429bce02c48f.zip
RustAndDust-7901668249d2f0d9669a170cf7bf429bce02c48f.tar.gz
Map0Hex: add protected IterableArray<Zone> entryZones and exitZones
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map0Hex.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
index 0d56c45..95e56ae 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
@@ -8,19 +8,21 @@ import ch.asynk.rustanddust.engine.Board;
import ch.asynk.rustanddust.engine.SelectedTile;
import ch.asynk.rustanddust.engine.util.IterableArray;
import ch.asynk.rustanddust.game.Hex;
+import ch.asynk.rustanddust.game.Zone;
import ch.asynk.rustanddust.game.Army;
public abstract class Map0Hex extends Board
{
protected final RustAndDust game;
- protected final IterableArray<Hex> objectives;
+ protected final IterableArray<Hex> objectives = new IterableArray<Hex>(10);
+ protected final IterableArray<Zone> entryZones = new IterableArray<Zone>(10);
+ protected final IterableArray<Zone> exitZones = new IterableArray<Zone>(10);
public Map0Hex(final RustAndDust game, Texture map, SelectedTile hex)
{
super(game.factory, map, hex);
this.game = game;
- this.objectives = new IterableArray<Hex>(10);
}
@Override
@@ -69,6 +71,16 @@ public abstract class Map0Hex extends Board
return n;
}
+ public void addEntryZone(Zone zone)
+ {
+ entryZones.add(zone);
+ }
+
+ public void addExitZone(Zone zone)
+ {
+ exitZones.add(zone);
+ }
+
public void hexSelect(Hex hex) { selectedTile.set(hex); }
public void hexUnselect(Hex hex) { selectedTile.hide(); }
public void hexMoveShow(Hex hex) { enableOverlayOn(hex, Hex.MOVE, true); }