Package squidpony.squidgrid.zone
Interface ImmutableZone
- All Superinterfaces:
Iterable<Coord>
,Serializable
,Zone
- All Known Implementing Classes:
CoordPackerZone
public interface ImmutableZone 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 the area of this Zone in the four cardinal directions, performing the expansion consecutivelydistance
times.Zone
expand8way(int distance)
Expands the area of 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 the area of this Zone in the four cardinal directions, performing the expansion consecutivelydistance
times. Does not modify this Zone; returns a new Zone with the requested changes.- Parameters:
distance
- the amount to expand outward using Manhattan distance (diamond shape)- Returns:
- a freshly-constructed Zone with the requested changes
-
expand8way
Expands the area of this Zone in the four cardinal and four diagonal directions, performing the expansion consecutivelydistance
times. Does not modify this Zone; returns a new Zone with the requested changes.- Parameters:
distance
- the amount to expand outward using Chebyshev distance (square shape)- Returns:
- a freshly-constructed Zone with the requested changes
-