diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-22 14:59:02 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-01-22 14:59:02 +0100 |
commit | 7927498b806d87557e2bb0f7b1ec6704d649fc99 (patch) | |
tree | ddbb082a66dfe5aa04ea79614435045734b78161 | |
parent | 82a69ebaaaf7368f9108b2e254a4e77a2efea33b (diff) | |
download | RustAndDust-7927498b806d87557e2bb0f7b1ec6704d649fc99.zip RustAndDust-7927498b806d87557e2bb0f7b1ec6704d649fc99.tar.gz |
Battle: add public int getId()
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Battle.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Battle.java b/core/src/ch/asynk/rustanddust/game/Battle.java index add6820..8be82c1 100644 --- a/core/src/ch/asynk/rustanddust/game/Battle.java +++ b/core/src/ch/asynk/rustanddust/game/Battle.java @@ -5,6 +5,8 @@ import ch.asynk.rustanddust.game.Factory.MapType; public interface Battle { + public int getId(); + public String getName(); public String getDescription(); diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java index e09ce8d..6ea1046 100644 --- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java @@ -20,6 +20,7 @@ public abstract class BattleCommon implements Battle { protected final static Random random = new Random(System.currentTimeMillis()); + protected int _id; protected Factory.MapType mapType; protected String name; protected String description; @@ -57,6 +58,12 @@ public abstract class BattleCommon implements Battle } @Override + public int getId() + { + return _id; + } + + @Override public String toString() { return getName(); |