summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-22 14:55:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-22 14:55:43 +0100
commit83a4f28b17cae4f50f1cb08c6c0fb48749a5926d (patch)
treee6948ae87a410c96000c700c3e8d7cd47c72f1ea /core/src/ch/asynk
parenta3ad4c8f21ef37bd0c0c6c5989f5b7d43b78a7fa (diff)
downloadRustAndDust-83a4f28b17cae4f50f1cb08c6c0fb48749a5926d.zip
RustAndDust-83a4f28b17cae4f50f1cb08c6c0fb48749a5926d.tar.gz
Map5Marshal: add clearMarshalUnits()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
index b6f9a18..a961b11 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
@@ -27,6 +27,8 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal
{
private static UnitList units = new UnitList(30);
+ public void clearMarshalUnits() { units.clear(); }
+
public Map5Marshal(final RustAndDust game, Texture map, SelectedTile hex)
{
super(game, map, hex);
@@ -261,12 +263,11 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal
loadMap(v.get("map"));
else if(mode == Marshal.Mode.ORDERS)
loadOrders(v.get("orders"));
- units.clear();
}
public void loadPlayers(JsonValue v, Player[] players)
{
- units.clear();
+ clearMarshalUnits();
players[0] = loadPlayer(v.get("players").get(0));
players[1] = loadPlayer(v.get("players").get(1));
}