diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-08 10:03:47 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-08 10:03:47 +0200 |
commit | 7c62dcba243717da017db7b3558263536cf2d4be (patch) | |
tree | 6af01b9535646a620b934b1c9158c8abfa032f77 /core/src | |
parent | 964161e283d47f15fe6e3614fc6b0af0684718a3 (diff) | |
download | RustAndDust-7c62dcba243717da017db7b3558263536cf2d4be.zip RustAndDust-7c62dcba243717da017db7b3558263536cf2d4be.tar.gz |
Hex: clarify constants
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 14 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 20 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/GameStateCommon.java | 4 |
3 files changed, 19 insertions, 19 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 8266aba..35bef9a 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -20,13 +20,13 @@ public class Hex extends Tile TOWN } - public static final int FOG = 0; - public static final int BLUE = 1; - public static final int GREEN = 2; - public static final int RED = 3; - public static final int MOVE = 4; - public static final int ROSE = 5; - public static final int ASSIST = 6; + public static final int FOG = 0; + public static final int SELECT = 1; + public static final int MOVE1 = 2; + public static final int TARGET = 3; + public static final int MOVE2 = 4; + public static final int DIRECTIONS = 5; + public static final int ASSIST = 6; 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 6ea37b7..1e0a654 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -70,7 +70,7 @@ public abstract class Map extends Board public void enablePossibleMoves(boolean enable) { for(GridPoint2 hex : possibleMoves) - enableOverlayOn(hex, Hex.GREEN, enable); + enableOverlayOn(hex, Hex.MOVE1, enable); } public void enableMoveAssists(boolean enable) @@ -82,18 +82,18 @@ public abstract class Map extends Board public void enablePossibleTargets(boolean enable) { for(GridPoint2 hex : possibleTargets) - enableOverlayOn(hex, Hex.RED, enable); + enableOverlayOn(hex, Hex.TARGET, enable); } public void enablePossiblePaths(boolean enable, boolean keepMoves) { if (keepMoves) { for(GridPoint2 hex : possiblePaths) - enableOverlayOn(hex, Hex.GREEN, enable); + enableOverlayOn(hex, Hex.MOVE1, enable); } else { for(GridPoint2 hex : possiblePaths) { - enableOverlayOn(hex, Hex.GREEN, enable); - enableOverlayOn(hex, Hex.MOVE, false); + enableOverlayOn(hex, Hex.MOVE1, enable); + enableOverlayOn(hex, Hex.MOVE2, false); } } } @@ -175,21 +175,21 @@ public abstract class Map extends Board public void togglePathOverlay(GridPoint2 hex) { - boolean enable= !isOverlayEnabledOn(hex, Hex.MOVE); - enableOverlayOn(hex, Hex.MOVE, enable); + boolean enable= !isOverlayEnabledOn(hex, Hex.MOVE2); + enableOverlayOn(hex, Hex.MOVE2, enable); } public void enableFinalPath(GridPoint2 dst, boolean enable) { for(GridPoint2 hex : possiblePaths) { - enableOverlayOn(hex, Hex.GREEN, false); - enableOverlayOn(hex, Hex.MOVE, enable); + enableOverlayOn(hex, Hex.MOVE1, false); + enableOverlayOn(hex, Hex.MOVE2, enable); } enableDirections(dst, enable); } public void enableDirections(GridPoint2 hex, boolean enable) { - enableOverlayOn(hex, Hex.ROSE, enable); + enableOverlayOn(hex, Hex.DIRECTIONS, enable); } } diff --git a/core/src/ch/asynk/tankontank/game/states/GameStateCommon.java b/core/src/ch/asynk/tankontank/game/states/GameStateCommon.java index 94ec4af..74fff8f 100644 --- a/core/src/ch/asynk/tankontank/game/states/GameStateCommon.java +++ b/core/src/ch/asynk/tankontank/game/states/GameStateCommon.java @@ -70,12 +70,12 @@ public abstract class GameStateCommon implements GameState protected void unselectHex(GridPoint2 hex) { - map.enableOverlayOn(hex, Hex.BLUE, false); + map.enableOverlayOn(hex, Hex.SELECT, false); } protected void selectHex(GridPoint2 hex) { - map.enableOverlayOn(hex, Hex.BLUE, true); + map.enableOverlayOn(hex, Hex.SELECT, true); } protected void reselectHex() |