diff options
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Factory.java | 9 |
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; |