diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-17 10:34:23 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-17 10:34:23 +0200 |
commit | eaf93d27c7fc95524062a2fb90ed83a264ef3691 (patch) | |
tree | 7096996fef7952d9699117e808a33d1cbf596fac /core/src/ch | |
parent | 020b72ea69d57e308760fca0b2ec1d812807dc63 (diff) | |
download | RustAndDust-eaf93d27c7fc95524062a2fb90ed83a264ef3691.zip RustAndDust-eaf93d27c7fc95524062a2fb90ed83a264ef3691.tar.gz |
Player: add getName()
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Player.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index e2aec6b..ca2ca64 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -105,7 +105,7 @@ public class Ctrl implements Disposable player().turnEnd(); player = ((player + 1) % 2); player().turnStart(); - hud.notify(player().army + "'s turn"); + hud.notify(player().getName() + "'s turn"); } private void checkTurnEnd() diff --git a/core/src/ch/asynk/tankontank/game/Player.java b/core/src/ch/asynk/tankontank/game/Player.java index 951bafd..75368cc 100644 --- a/core/src/ch/asynk/tankontank/game/Player.java +++ b/core/src/ch/asynk/tankontank/game/Player.java @@ -42,6 +42,11 @@ public class Player implements Drawable, Disposable this.status = new Msg(font, atlas.findRegion("disabled")); } + public String getName() + { + return army.toString(); + } + public String toString() { return army + " AP: " + actionPoints + |