diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-28 17:56:43 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-28 17:56:43 +0100 |
commit | aecdc3c1d331c774650ed17013c8143a73717aaf (patch) | |
tree | 1959f298994acfa59156fbd2ef5f629c984a5b5a /core/src | |
parent | 02bd9c7afcde4a6518a5b9efdc4033318a305e3d (diff) | |
download | RustAndDust-aecdc3c1d331c774650ed17013c8143a73717aaf.zip RustAndDust-aecdc3c1d331c774650ed17013c8143a73717aaf.tar.gz |
PathIterator: throws java.util.NoSuchElementException when needed
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/PathIterator.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/PathIterator.java b/core/src/ch/asynk/rustanddust/engine/PathIterator.java index 53f2f82..8a56729 100644 --- a/core/src/ch/asynk/rustanddust/engine/PathIterator.java +++ b/core/src/ch/asynk/rustanddust/engine/PathIterator.java @@ -41,6 +41,9 @@ public class PathIterator implements Iterator<Vector3> @Override public Vector3 next() { + if (!hasNext()) + throw new java.util.NoSuchElementException(); + if (tile == to) { v.z = orientation.r(); o = orientation; |