summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map0Hex.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
index e40f58c..607a1e4 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
@@ -58,6 +58,15 @@ public abstract class Map0Hex extends Board
if (!objectives.contains(hex))
objectives.add(hex);
}
+
+ public int objectivesCount(Army army)
+ {
+ int n = 0;
+ for (Hex hex : objectives) {
+ if (hex.belongsTo(army))
+ n += 1;
+ }
+ return n;
}
public void hexSelect(Hex hex) { selectedTile.set(hex); }