summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-09 12:18:35 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-09 12:18:35 +0100
commit648a5e0ab3b30d1c0c395059f1f4bbb5d31bfb81 (patch)
treec7c2a7d4854660eba8ebd25ce28c9632ab3c387a
parent54b192498d816e6aeb01c96101e7e6871ee77e5a (diff)
downloadRustAndDust-648a5e0ab3b30d1c0c395059f1f4bbb5d31bfb81.zip
RustAndDust-648a5e0ab3b30d1c0c395059f1f4bbb5d31bfb81.tar.gz
Move: get rid of useless TileIterator
-rw-r--r--core/src/ch/asynk/rustanddust/engine/Move.java51
1 files changed, 0 insertions, 51 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/Move.java b/core/src/ch/asynk/rustanddust/engine/Move.java
index 34797b8..077823f 100644
--- a/core/src/ch/asynk/rustanddust/engine/Move.java
+++ b/core/src/ch/asynk/rustanddust/engine/Move.java
@@ -7,52 +7,6 @@ import com.badlogic.gdx.math.Vector3;
public class Move extends Path implements Iterable<Vector3>
{
- public class TileIterator implements Iterator<Tile>
- {
- private int i;
- private Tile tile;
- private Move move;
-
- public TileIterator(Move move)
- {
- this.i = -1;
- this.tile = null;
- this.move = move;
- }
-
- @Override
- public boolean hasNext()
- {
- if (i == move.tiles.size())
- return false;
- return true;
- }
-
- @Override
- public Tile next()
- {
- if (!hasNext())
- throw new java.util.NoSuchElementException();
-
- if (tile != null) {
- i += 1;
- if (i < move.tiles.size())
- tile = move.tiles.get(i);
- else
- tile = move.to;
- } else
- tile = move.from;
-
- return tile;
- }
-
- @Override
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
- }
-
public enum MoveType
{
REGULAR,
@@ -187,11 +141,6 @@ public class Move extends Path implements Iterable<Vector3>
return steps;
}
- public Iterator<Tile> tileIterator()
- {
- return new TileIterator(this);
- }
-
@Override
public String toString()
{