public static class SquidIterators.VerticalUp extends java.lang.Object implements SquidIterator
Modifier and Type | Field and Description |
---|---|
protected int |
height
The grid's height
|
protected Coord |
prev |
protected int |
startx
The starting X-coordinate
|
protected int |
starty
The starting Y-coordinate
|
protected int |
width
The grid's width
|
Constructor and Description |
---|
VerticalUp(Coord start,
int width,
int height)
An iterator to iterate vertically, starting AFTER
start . |
VerticalUp(int startx,
int starty,
int width,
int height)
An iterator to iterate vertically, starting AFTER
(startx, starty) . |
Modifier and Type | Method and Description |
---|---|
protected Coord |
findNext() |
boolean |
hasNext() |
Coord |
next() |
void |
remove() |
protected final int startx
protected final int starty
protected Coord prev
protected final int width
protected final int height
public VerticalUp(int startx, int starty, int width, int height)
(startx, starty)
. This iterates cycles when it reaches the
map's bound, but it iterates at most once on a cell, i.e. it does at
most one roll over a column of the map.startx
- The starting X-coordinate.starty
- The starting vertical-coordinate.width
- The map's width.height
- The map's height.public VerticalUp(Coord start, int width, int height)
start
. This
iterates cycles when it reaches the map's bound, but it iterates at
most once on a cell, i.e. it does at most one roll over a column of
the map.start
- The starting coordinate.width
- The map's width.height
- The map's height.Copyright © Eben Howard 2012–2022. All rights reserved.