Package squidpony.squidgrid.zone
Interface MutableZone
- All Superinterfaces:
Iterable<Coord>
,Serializable
,Zone
- All Known Implementing Classes:
GreasedRegion
public interface MutableZone extends Zone
Created by Tommy Ettinger on 11/24/2016.
-
Nested Class Summary
Nested classes/interfaces inherited from interface squidpony.squidgrid.zone.Zone
Zone.Helper, Zone.Skeleton
-
Method Summary
Modifier and Type Method Description Zone
expand(int distance)
Expands this Zone in the four cardinal directions, performing the expansion consecutivelydistance
times.Zone
expand8way(int distance)
Expands this Zone in the four cardinal and four diagonal directions, performing the expansion consecutivelydistance
times.Methods inherited from interface squidpony.squidgrid.zone.Zone
contains, contains, contains, extend, getAll, getCenter, getDiagonal, getExternalBorder, getHeight, getInternalBorder, getWidth, intersectsWith, isEmpty, size, translate, translate, xBound, yBound
-
Method Details
-
expand
Expands this Zone in the four cardinal directions, performing the expansion consecutivelydistance
times. Modified this Zone in-place and returns it for chaining.- Parameters:
distance
- the amount to expand outward using Manhattan distance (diamond shape)- Returns:
- this for chaining, after being modified in-place
-
expand8way
Expands this Zone in the four cardinal and four diagonal directions, performing the expansion consecutivelydistance
times. Modified this Zone in-place and returns it for chaining.- Parameters:
distance
- the amount to expand outward using Chebyshev distance (square shape)- Returns:
- this for chaining, after being modified in-place
-