summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game/states
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-10 14:06:48 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-10 14:06:48 +0200
commit758793c53e9fbb9701d2a9b62abc5adb4b67477e (patch)
tree58f0fbd2cbcbcc1ca92059c38fdcdbec0bb68163 /core/src/ch/asynk/rustanddust/game/states
parent7a583d4157bd91a0d088968edd438b055cf41c6b (diff)
downloadRustAndDust-758793c53e9fbb9701d2a9b62abc5adb4b67477e.zip
RustAndDust-758793c53e9fbb9701d2a9b62abc5adb4b67477e.tar.gz
Battle: clean up map.clear() usage
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/states')
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java3
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateSelect.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java
index ffb1f24..847b622 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateReinforcement.java
@@ -12,7 +12,8 @@ public class StateReinforcement extends StateCommon
@Override
public void enterFrom(StateType prevState)
{
- map.clear();
+ map.clearMoves();
+ map.clearUnits();
entryZone = null;
activeUnit = null;
selectedHex = null;
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
index 8118e89..1f042e7 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java
@@ -124,7 +124,8 @@ public class StateSelect extends StateCommon
private void clear()
{
hide();
- map.clear();
+ map.clearMoves();
+ map.clearUnits();
to = null;
isEnemy = false;
selectedHex = null;