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/engine/Faction.java1
-rw-r--r--core/src/ch/asynk/rustanddust/game/Army.java26
-rw-r--r--core/src/ch/asynk/rustanddust/game/Factory.java2
3 files changed, 17 insertions, 12 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Faction.java b/core/src/ch/asynk/rustanddust/engine/Faction.java
index e108fc4..3b93353 100644
--- a/core/src/ch/asynk/rustanddust/engine/Faction.java
+++ b/core/src/ch/asynk/rustanddust/engine/Faction.java
@@ -3,4 +3,5 @@ package ch.asynk.rustanddust.engine;
public interface Faction
{
public boolean isEnemy(Faction other);
+ public int overlay();
}
diff --git a/core/src/ch/asynk/rustanddust/game/Army.java b/core/src/ch/asynk/rustanddust/game/Army.java
index 9a1663b..4bfe10e 100644
--- a/core/src/ch/asynk/rustanddust/game/Army.java
+++ b/core/src/ch/asynk/rustanddust/game/Army.java
@@ -1,27 +1,31 @@
package ch.asynk.rustanddust.game;
import ch.asynk.rustanddust.engine.Faction;
+import ch.asynk.rustanddust.game.Hex;
import ch.asynk.rustanddust.game.Factory;
public enum Army implements Faction
{
- NONE("None", null),
- GE("German", Factory.FLAG_GE),
- US("US", Factory.FLAG_US),
- USSR("Soviet", null),
- EN("English", null);
+ NONE("None", null, -1),
+ GE("German", Factory.FLAG_GE, Hex.OBJECTIVE_GE),
+ US("US", Factory.FLAG_US, Hex.OBJECTIVE_US),
+ USSR("Soviet", null, -1),
+ EN("English", null, -1);
- private String s;
- private String f;
+ public final String s;
+ public final String flag;
+ public final int overlay;
- Army(String s, String f) {
+ Army(String s, String f, int o) {
this.s = s;
- this.f = f;
+ this.flag = f;
+ this.overlay = o;
}
- public String flag()
+ @Override
+ public int overlay()
{
- return f;
+ return overlay;
}
@Override
diff --git a/core/src/ch/asynk/rustanddust/game/Factory.java b/core/src/ch/asynk/rustanddust/game/Factory.java
index 83968f6..6f5b731 100644
--- a/core/src/ch/asynk/rustanddust/game/Factory.java
+++ b/core/src/ch/asynk/rustanddust/game/Factory.java
@@ -86,7 +86,7 @@ public class Factory implements Board.TileBuilder, Disposable
public AtlasRegion getFlag(Army army)
{
- return hudAtlas.findRegion(army.flag());
+ return hudAtlas.findRegion(army.flag);
}
public Map getMap(MapType t)