public static class SquidIterators.RectangleFromBottomLeftToTopRight extends java.lang.Object implements SquidIterator
Put differently, the rectangle whose bottom left is (x, y) and has width and height 2, contains the cells (x, y), (x + 1, y), (x, y - 1), and (x + 1, y - 1); but it does NOT contain (x + 2, y), nor (x + 2, y - 1), nor (x + 2, y - 2).
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected Coord |
previous
The last cell returned
|
protected int |
width |
protected int |
xstart |
protected int |
ystart |
Constructor and Description |
---|
RectangleFromBottomLeftToTopRight(Coord start,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Coord |
next() |
protected Coord |
next0() |
void |
remove() |
protected final int xstart
protected final int ystart
protected final int width
protected final int height
protected Coord previous
public RectangleFromBottomLeftToTopRight(Coord start, int width, int height)
Copyright © Eben Howard 2012–2022. All rights reserved.