Package squidpony.squidgrid.iterator
Class SquidIterators.AroundCounterClockWise
java.lang.Object
squidpony.squidgrid.iterator.SquidIterators.AroundCounterClockWise
- All Implemented Interfaces:
Iterator<Coord>,SquidIterator
- Enclosing class:
- SquidIterators
public static class SquidIterators.AroundCounterClockWise extends Object implements SquidIterator
An iterator that iterates around a starting position (counter clockwise).
It can return at most 9 elements. Instances of this iterator only return
coordinates that are valid w.r.t. to the widths and heights given at
creation time (i.e. they do not go off the map).
- Author:
- smelC
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AroundCounterClockWise(int width, int height, int xstart, int ystart)A fresh iterator, to iterate counter clock wise around(xstart, ystart)starting onstart's right.AroundCounterClockWise(int width, int height, Coord start)A fresh iterator, to iterate counter clock wise aroundstartstarting onstart's right. -
Method Summary
-
Field Details
-
Constructor Details
-
AroundCounterClockWise
A fresh iterator, to iterate counter clock wise aroundstartstarting onstart's right.- Parameters:
width- The grid's width.height- The grid's height.start-
-
AroundCounterClockWise
A fresh iterator, to iterate counter clock wise around(xstart, ystart)starting onstart's right.- Parameters:
width- The grid's width.height- The grid's height.xstart- The starting x-coordinate.ystart- The starting y-coordinate.
-
-
Method Details