diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/Move.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Move.java b/core/src/ch/asynk/rustanddust/engine/Move.java index 3ff7c54..34797b8 100644 --- a/core/src/ch/asynk/rustanddust/engine/Move.java +++ b/core/src/ch/asynk/rustanddust/engine/Move.java @@ -23,7 +23,7 @@ public class Move extends Path implements Iterable<Vector3> @Override public boolean hasNext() { - if (tile == move.to) + if (i == move.tiles.size()) return false; return true; } @@ -31,7 +31,7 @@ public class Move extends Path implements Iterable<Vector3> @Override public Tile next() { - if (tile == move.to) + if (!hasNext()) throw new java.util.NoSuchElementException(); if (tile != null) { |