diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-14 11:16:06 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-14 11:16:06 +0200 |
commit | a34c377e53061db4d2affe8bda13d12fb1038911 (patch) | |
tree | 624816bfb9dd5bcf27e1190aa48b5cbc6f2ad4ec /core/src/ch/asynk/tankontank/game/states | |
parent | 9108226756b227265be365d40efa4b3942aa712a (diff) | |
download | RustAndDust-a34c377e53061db4d2affe8bda13d12fb1038911.zip RustAndDust-a34c377e53061db4d2affe8bda13d12fb1038911.tar.gz |
Board: add simpler buildPossibleTargetsFrom() based on enemy units
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateAttack.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateSelect.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateAttack.java b/core/src/ch/asynk/tankontank/game/states/StateAttack.java index 7c4d6b2..bbf54d1 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateAttack.java +++ b/core/src/ch/asynk/tankontank/game/states/StateAttack.java @@ -19,7 +19,7 @@ public class StateAttack extends StateCommon // use selectedHex and selectedPawn from.set(selectedHex); map.showPossibleTargets(false); - map.buildPossibleTargets(selectedPawn, from); + map.buildPossibleTargets(selectedPawn, from, ctrl.otherPlayer().unitIterator()); map.showPossibleTargets(true); if (to.x != -1) { // quick fire -> replay touchUp diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 0ae3465..5dc5e68 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -53,7 +53,7 @@ public class StateSelect extends StateCommon if (hasPawn() && (!isEnemy || ctrl.cfg.showEnemyPossibilities)) { int moves = map.buildPossibleMoves(selectedPawn, selectedHex); - int targets = map.buildPossibleTargets(selectedPawn, selectedHex); + int targets = map.buildPossibleTargets(selectedPawn, selectedHex, ctrl.otherPlayer().unitIterator()); int assists = map.buildMoveAssists(selectedPawn, selectedHex); showPossibleTargetsMovesAssists(selectedPawn); ctrl.hud.show( |