Package squidpony.squidgrid.zone
Class Zone.Helper
java.lang.Object
squidpony.squidgrid.zone.Zone.Helper
- Enclosing interface:
- Zone
public static final class Zone.Helper extends Object
-
Constructor Summary
Constructors Constructor Description Helper() -
Method Summary
-
Constructor Details
-
Method Details
-
border
An easy way to get the Coord items in a List of Coord that are at the edge of the region, using 8-way adjacency (a corner is adjacent to both orthogonal and diagonal neighbors). This is not the most efficient way to do this; If you find you need to do more complicated manipulations of regions or are calling this method often, consider usingGreasedRegion, which should be significantly faster and has better support for more intricate alterations on an area of Coords.- Parameters:
zone- a List of Coord representing a regionbuffer- The list to fill if non null (i.e. if non-null, it is returned). If null, a fresh list will be allocated and returned.- Returns:
- Elements in
zonethat are neighbors to an element not inzone.
-