public static final class Zone.Helper
extends java.lang.Object
Constructor and Description |
---|
Helper() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Coord> |
border(java.util.List<Coord> zone,
java.util.List<Coord> buffer)
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).
|
public static java.util.List<Coord> border(java.util.List<Coord> zone, java.util.List<Coord> buffer)
GreasedRegion
, which should be
significantly faster and has better support for more intricate alterations on an area of Coords.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.zone
that are neighbors to an element not in zone
.Copyright © Eben Howard 2012–2022. All rights reserved.