public static class SquidIterators.AroundCounterClockWise extends java.lang.Object implements SquidIterator
Modifier and Type | Field and Description |
---|---|
protected int |
height |
protected Direction |
prev |
protected int |
width |
protected int |
xstart |
protected int |
ystart |
Constructor and Description |
---|
AroundCounterClockWise(int width,
int height,
Coord start)
A fresh iterator, to iterate counter clock wise around
start
starting on start 's right. |
AroundCounterClockWise(int width,
int height,
int xstart,
int ystart)
A fresh iterator, to iterate counter clock wise around
(xstart, ystart) starting on start 's right. |
Modifier and Type | Method and Description |
---|---|
protected Coord |
findNext(boolean mute) |
boolean |
hasNext() |
protected boolean |
isInGrid(int x,
int y) |
Coord |
next() |
void |
remove() |
protected final int width
protected final int height
protected final int xstart
protected final int ystart
protected Direction prev
public AroundCounterClockWise(int width, int height, Coord start)
start
starting on start
's right.width
- The grid's width.height
- The grid's height.start
- public AroundCounterClockWise(int width, int height, int xstart, int ystart)
(xstart, ystart)
starting on start
's right.width
- The grid's width.height
- The grid's height.xstart
- The starting x-coordinate.ystart
- The starting y-coordinate.Copyright © Eben Howard 2012–2022. All rights reserved.