diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-28 11:40:28 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-28 11:40:28 +0100 |
commit | a195273b884f8560f4c7eef32a07824b5eeb9306 (patch) | |
tree | 8b58c4c058255f6d85d9c9de15a52b785b6d257e /core/src/ch/asynk/tankontank/game | |
parent | 1a7f37e604d765ea6572c36460fc404905b64f61 (diff) | |
download | RustAndDust-a195273b884f8560f4c7eef32a07824b5eeb9306.zip RustAndDust-a195273b884f8560f4c7eef32a07824b5eeb9306.tar.gz |
Map,StateCommon: hidePossibleTargetsMovesAssists() goes from Map to StateCommon
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateCommon.java | 7 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateSelect.java | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index bc95a44..56b5db9 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -117,13 +117,6 @@ public abstract class Map extends Board enableOverlayOn(hex, Hex.ORIENTATION, enable, o); } - public void hidePossibleTargetsMovesAssists() - { - possibleMoves.hide(); - possibleTargets.hide(); - moveAssists.hide(); - } - public void togglePathOverlay(Hex hex) { boolean enable= !hex.isOverlayEnabled(Hex.MOVE2); diff --git a/core/src/ch/asynk/tankontank/game/states/StateCommon.java b/core/src/ch/asynk/tankontank/game/states/StateCommon.java index a38d015..03a4ede 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateCommon.java +++ b/core/src/ch/asynk/tankontank/game/states/StateCommon.java @@ -114,4 +114,11 @@ public abstract class StateCommon implements State if (ctrl.cfg.showTargets && pawn.canAttack()) map.possibleTargets.show(); if (ctrl.cfg.showMoveAssists && pawn.canMove()) map.moveAssists.show(); } + + protected void hidePossibleTargetsMovesAssists() + { + map.possibleMoves.hide(); + map.possibleTargets.hide(); + map.moveAssists.hide(); + } } diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 2b8f5e3..0829d73 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -21,7 +21,7 @@ public class StateSelect extends StateCommon @Override public void leave(StateType nextState) { - map.hidePossibleTargetsMovesAssists(); + hidePossibleTargetsMovesAssists(); } @Override @@ -49,7 +49,7 @@ public class StateSelect extends StateCommon } selectHexAndPawn(upHex); - map.hidePossibleTargetsMovesAssists(); + hidePossibleTargetsMovesAssists(); if (hasPawn() && (!isEnemy || ctrl.cfg.showEnemyPossibilities)) { int moves = map.buildPossibleMoves(selectedPawn); @@ -79,7 +79,7 @@ public class StateSelect extends StateCommon public void abort() { if (selectedHex != null) map.selectHex(selectedHex, false); - map.hidePossibleTargetsMovesAssists(); + hidePossibleTargetsMovesAssists(); clearAll(); map.clearAll(); } |