diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 21:37:46 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-18 21:37:46 +0100 |
commit | 57bece2d07163b7f6768170da10969b0f46af618 (patch) | |
tree | ee1dd6ab30695f816093a94e3ec8b05978bc5b8f /core | |
parent | 917bdd0cf855943962ead962869e127a0a63be1d (diff) | |
download | RustAndDust-57bece2d07163b7f6768170da10969b0f46af618.zip RustAndDust-57bece2d07163b7f6768170da10969b0f46af618.tar.gz |
Command: orderPool -> commandPool
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Command.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Command.java b/core/src/ch/asynk/tankontank/game/Command.java index 1ac1bb5..c310bd8 100644 --- a/core/src/ch/asynk/tankontank/game/Command.java +++ b/core/src/ch/asynk/tankontank/game/Command.java @@ -19,7 +19,7 @@ public class Command extends Order END_OF_TURN; } - private static final Pool<Command> orderPool = new Pool<Command>() + private static final Pool<Command> commandPool = new Pool<Command>() { @Override protected Command newObject() { @@ -27,9 +27,14 @@ public class Command extends Order } }; + public static void clearPool() + { + commandPool.clear(); + } + public static Command get(Player player) { - Command c = orderPool.obtain(); + Command c = commandPool.obtain(); c.player = player; return c; } @@ -48,7 +53,7 @@ public class Command extends Order @Override public void dispose() { - orderPool.free(this); + commandPool.free(this); } @Override |