summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Factory.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Factory.java b/core/src/ch/asynk/rustanddust/game/Factory.java
index 5817ab9..f48094e 100644
--- a/core/src/ch/asynk/rustanddust/game/Factory.java
+++ b/core/src/ch/asynk/rustanddust/game/Factory.java
@@ -61,6 +61,15 @@ public class Factory implements Board.TileBuilder, Disposable
game.db.storeBattle(battles[i].getId(), battles[i].getName());
}
+ public Battle getBattle(int id)
+ {
+ for (int i = 0; i < battles.length; i++) {
+ if (battles[i].getId() == id)
+ return battles[i];
+ }
+ return null;
+ }
+
public void assetsLoaded()
{
if (assetsLoaded) return;