summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-04-22 11:12:15 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-04-22 11:12:15 +0200
commit2909874fec33a83a70310d9aabe201c2d0d858b1 (patch)
tree29fff36450938bfb57aee54f599fd02e0c0cd4a7 /core/src/ch
parent517b5b506a91248f827971a810182536526e46cb (diff)
downloadRustAndDust-2909874fec33a83a70310d9aabe201c2d0d858b1.zip
RustAndDust-2909874fec33a83a70310d9aabe201c2d0d858b1.tar.gz
OrderList: add Order getId(int)
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/OrderList.java9
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();