summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game/states
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-17 14:52:51 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-17 14:52:51 +0100
commit8d6f8738203d45d4da116e390b6e6685f4636bb3 (patch)
treecc78b335fcbf9f805f419d9f7aa33284b3c3b815 /core/src/ch/asynk/tankontank/game/states
parentb4c82404bcb7b2e1f58339088ccf48023c1da6f9 (diff)
downloadRustAndDust-8d6f8738203d45d4da116e390b6e6685f4636bb3.zip
RustAndDust-8d6f8738203d45d4da116e390b6e6685f4636bb3.tar.gz
Player: clean up API
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateEngage.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateEngage.java b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
index 1586d80..4b1539b 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateEngage.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
@@ -19,7 +19,7 @@ public class StateEngage extends StateCommon
activeUnit = null;
// use selectedHex and selectedUnit
map.hidePossibleTargets();
- map.collectPossibleTargets(selectedUnit, ctrl.opponent.unitIterator());
+ map.collectPossibleTargets(selectedUnit, ctrl.opponent.units);
map.showPossibleTargets();
if (to != null) {
// quick fire -> replay touchUp
@@ -89,7 +89,7 @@ public class StateEngage extends StateCommon
to = upHex;
activeUnit = unit;
activeUnit.showTarget();
- map.collectAttackAssists(selectedUnit, activeUnit, ctrl.player.unitIterator());
+ map.collectAttackAssists(selectedUnit, activeUnit, ctrl.player.units);
map.showAttackAssists();
ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0));
}
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
index 7e7059e..7bdc815 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
@@ -77,9 +77,9 @@ public class StateSelect extends StateCommon
int moves = map.collectPossibleMoves(selectedUnit);
int targets = 0;
if (isEnemy)
- targets = map.collectPossibleTargets(selectedUnit, ctrl.player.unitIterator());
+ targets = map.collectPossibleTargets(selectedUnit, ctrl.player.units);
else
- targets = map.collectPossibleTargets(selectedUnit, ctrl.opponent.unitIterator());
+ targets = map.collectPossibleTargets(selectedUnit, ctrl.opponent.units);
if (moves > 0)
map.collectMoveablePawns(selectedUnit);
showPossibilities(selectedUnit);