diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-22 11:12:15 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-22 11:12:15 +0200 |
commit | 2909874fec33a83a70310d9aabe201c2d0d858b1 (patch) | |
tree | 29fff36450938bfb57aee54f599fd02e0c0cd4a7 /core/src/ch/asynk/rustanddust/game | |
parent | 517b5b506a91248f827971a810182536526e46cb (diff) | |
download | RustAndDust-2909874fec33a83a70310d9aabe201c2d0d858b1.zip RustAndDust-2909874fec33a83a70310d9aabe201c2d0d858b1.tar.gz |
OrderList: add Order getId(int)
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/OrderList.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/OrderList.java b/core/src/ch/asynk/rustanddust/game/OrderList.java index 98cc741..7a8e3f3 100644 --- a/core/src/ch/asynk/rustanddust/game/OrderList.java +++ b/core/src/ch/asynk/rustanddust/game/OrderList.java @@ -22,6 +22,15 @@ public class OrderList extends IterableArray<Order> return null; } + public Order getId(int id) + { + for (Order o : this) { + if (o.id == id) + return o; + } + return null; + } + public void dispose(Unit unit) { Iterator<Order> it = iterator(); |