diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 12 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/ObjectiveSet.java | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 0abd9d6..6e89df4 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -29,9 +29,10 @@ public class Hex extends Tile public static final int MOVE = 3; public static final int DIRECTIONS = 4; public static final int ORIENTATION = 5; - public static final int OBJECTIVE = 6; // unclaimed - public static final int OBJECTIVE_GE= 7; - public static final int OBJECTIVE_US= 8; + public static final int OBJECTIVE = 6; + public static final int OBJECTIVE_HOLD = 7; + public static final int OBJECTIVE_GE = 8; + public static final int OBJECTIVE_US = 9; public Terrain terrain; public int roads; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index b059aab..71f29c7 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -489,11 +489,12 @@ public abstract class Map extends Board public void showOrientation(Hex hex, Orientation o) { enableOverlayOn(hex, Hex.ORIENTATION, o, true); } public void hideOrientation(Hex hex) { enableOverlayOn(hex, Hex.ORIENTATION, false); } - public void hideObjective(Hex hex) + public void showObjective(Hex hex, Army army, boolean hold) { - enableOverlayOn(hex, Hex.OBJECTIVE, false); - enableOverlayOn(hex, Hex.OBJECTIVE_US, false); - enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); + if (hold) + enableOverlayOn(hex, Hex.OBJECTIVE_HOLD, true); + else + enableOverlayOn(hex, Hex.OBJECTIVE, true); } public void showObjective(Hex hex, Army army) @@ -502,18 +503,15 @@ public abstract class Map extends Board case GE: enableOverlayOn(hex, Hex.OBJECTIVE_GE, true); enableOverlayOn(hex, Hex.OBJECTIVE_US, false); - enableOverlayOn(hex, Hex.OBJECTIVE, false); break; case US: enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); enableOverlayOn(hex, Hex.OBJECTIVE_US, true); - enableOverlayOn(hex, Hex.OBJECTIVE, false); break; case NONE: default: enableOverlayOn(hex, Hex.OBJECTIVE_GE, false); enableOverlayOn(hex, Hex.OBJECTIVE_US, false); - enableOverlayOn(hex, Hex.OBJECTIVE, true); break; } } diff --git a/core/src/ch/asynk/tankontank/game/ObjectiveSet.java b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java index 2a4f3ee..ab827f6 100644 --- a/core/src/ch/asynk/tankontank/game/ObjectiveSet.java +++ b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java @@ -21,7 +21,7 @@ public class ObjectiveSet extends HashMap<Hex, Objective> implements MoveToAnima public void add(Hex hex, Army army, boolean persistent) { put(hex, new Objective(army, persistent)); - map.showObjective(hex, army); + map.showObjective(hex, army, !persistent); } public int count(Army army) |