diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-13 17:22:03 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-13 17:22:03 +0100 |
commit | f74e9de84574721f7cf0689dc18a05cc50f50ba8 (patch) | |
tree | 59b6411ff23c99716152637f2ff6de8bb0747dd2 /core/src/ch/asynk/tankontank/game | |
parent | 524f0eacefb4b72cff034eac717bc270e43b6c6e (diff) | |
download | RustAndDust-f74e9de84574721f7cf0689dc18a05cc50f50ba8.zip RustAndDust-f74e9de84574721f7cf0689dc18a05cc50f50ba8.tar.gz |
Battle: add toString()
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/battles/BattleCommon.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java index 328b4d0..58abcd9 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleCommon.java @@ -30,6 +30,11 @@ public abstract class BattleCommon implements Battle this.factory = factory; } + public String toString() + { + return getName(); + } + public String getName() { return name; diff --git a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java index cbbeb6a..d1b9e46 100644 --- a/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java +++ b/core/src/ch/asynk/tankontank/game/battles/BattleHeadToHead.java @@ -20,6 +20,7 @@ public class BattleHeadToHead extends BattleCommon { super(factory); randomizeArmies(); + name = "Head To Head"; } public Player checkVictory(Ctrl ctrl) |