diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-19 22:26:41 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-02-19 22:26:41 +0100 |
commit | e85552df8ee25a4c71461cc74280c8e33a1084d4 (patch) | |
tree | 91caa6e473c6e164a41e0f38c6f4f65be87d152b /core/src | |
parent | 9caf0a7440cab1a6f0b21ec1e224050d9b5502ba (diff) | |
download | RustAndDust-e85552df8ee25a4c71461cc74280c8e33a1084d4.zip RustAndDust-e85552df8ee25a4c71461cc74280c8e33a1084d4.tar.gz |
getUnit() calls stack.stack.peekFirst()
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 328d2df..e86612d 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -57,9 +57,7 @@ public class Hex extends Tile public Unit getUnit() { - // TODO ugly - if (isEmpty()) return null; - return (Unit) iterator().next(); + return (Unit) stack.peekFirst(); } @Override |