summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-02-19 22:26:41 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-02-19 22:26:41 +0100
commite85552df8ee25a4c71461cc74280c8e33a1084d4 (patch)
tree91caa6e473c6e164a41e0f38c6f4f65be87d152b /core
parent9caf0a7440cab1a6f0b21ec1e224050d9b5502ba (diff)
downloadRustAndDust-e85552df8ee25a4c71461cc74280c8e33a1084d4.zip
RustAndDust-e85552df8ee25a4c71461cc74280c8e33a1084d4.tar.gz
getUnit() calls stack.stack.peekFirst()
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java4
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