summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-02-18 21:40:03 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-02-18 21:40:03 +0100
commita7e90e154140e931a4ed9abb6222ec1df659e97f (patch)
treed16363d0c2d8b06641fcaef450eb3a33b067c113 /core/src/ch/asynk
parent57bece2d07163b7f6768170da10969b0f46af618 (diff)
downloadRustAndDust-a7e90e154140e931a4ed9abb6222ec1df659e97f.zip
RustAndDust-a7e90e154140e931a4ed9abb6222ec1df659e97f.tar.gz
Map: orderList -> commands, Command.clearPool in dispose()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 32a8e7d..3f1a552 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -60,7 +60,7 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
private long soundId = -1;
private Animation animationClosure;
- private OrderList orderList;
+ private OrderList commands;
protected abstract void setup();
@@ -106,7 +106,7 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
objectives = new ObjectiveSet(this, 4);
meteorology = new Meteorology();
- orderList = new OrderList();
+ commands = new OrderList();
}
@Override
@@ -120,6 +120,7 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
PromoteAnimation.free();
FireAnimation.free();
commands.dispose();
+ Command.clearPool();
Engagement.clearPool();
}
@@ -351,9 +352,8 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
break;
}
- if (r != -1) {
- orderList.add(cmd);
- }
+ if (r != -1)
+ commands.add(cmd);
return r;
}
@@ -367,13 +367,13 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
public void turnDone()
{
- TankOnTank.debug("TurnDone", String.format(" Processed Commands : %d", orderList.size()));
+ TankOnTank.debug("TurnDone", String.format(" Processed Commands : %d", commands.size()));
if (objectives.modifiedCount() > 0)
throw new RuntimeException("objectives not cleared");
// FIXME do something with these Commands
- orderList.dispose();
+ commands.dispose();
}
public void actionDone()