public interface Area
Modifier and Type | Method and Description |
---|---|
java.util.List<Area> |
getAccessibleNeighbors()
Returns the accessible neighboring Areas.
- The accessible neighboring Areas are a subset of the neighboring Areas (the neighboring Areas can be iterated using ChokePointsByArea()). - Two neighboring Areas are accessible from each over if at least one the ChokePoints they share is not Blocked. |
java.util.List<Base> |
getBases()
Returns the Bases contained in this Area.
|
TilePosition |
getBottomRight()
Returns the bottom right position of the bounding box of this area.
|
TilePosition |
getBoundingBoxSize()
Returns the bounding box size of this area.
|
java.util.List<ChokePoint> |
getChokePoints()
Returns the ChokePoints between this Area and the neighboring ones.
- Note: if there are no neighboring Areas, then an empty set is returned. - Note: there may be more ChokePoints returned than the number of neighboring Areas, as there may be several ChokePoints between two Areas. |
java.util.List<ChokePoint> |
getChokePoints(Area area)
Returns the ChokePoints between this Area and the specified area.
- Assumes the specified area is a neighbor of this area, i.e. |
java.util.Map<Area,java.util.List<ChokePoint>> |
getChokePointsByArea()
Returns the ChokePoints of this Area grouped by neighboring Areas.
|
java.util.List<Geyser> |
getGeysers()
Returns the Geysers contained in this Area.
|
GroupId |
getGroupId()
- Unique id > 0 of the group of Areas which are accessible from this Area.
- For each pair (a, b) of Areas: a->GroupId() == b->GroupId() <==> a->AccessibleFrom(b) - A groupId uniquely identifies a maximum set of mutually accessible Areas, that is, in the absence of blocking ChokePoints, a continent. |
Altitude |
getHighestAltitude()
Returns the highest altitude observed in this area.
|
int |
getHighGroundPercentage()
Returns the percentage of high ground tiles in this area.
|
AreaId |
getId()
- Unique id > 0 of this Area.
|
int |
getLowGroundPercentage()
Returns the percentage of low ground tiles in this area.
|
java.util.List<Mineral> |
getMinerals()
Returns the Minerals contained in this Area.
|
int |
getSize()
Returns the number of MiniTiles in this area.
|
WalkPosition |
getTop()
Alias for
getWalkPositionWithHighestAltitude() |
TilePosition |
getTopLeft()
Returns the top left position of the bounding box of this area.
|
int |
getVeryHighGroundPercentage()
Returns the percentage of very high ground tiles in this area.
|
WalkPosition |
getWalkPositionWithHighestAltitude()
Returns the position of the MiniTile with the highest altitude value.
|
boolean |
isAccessibleFrom(Area area)
Returns whether this Area is accessible from the specified area, that is, if they share the
same GroupId().
- Note: accessibility is always symmetrical. - Note: even if a and b are neighboring Areas, we can have: a->AccessibleFrom(b) and not: contains(a->AccessibleNeighbors(), b) |
AreaId getId()
GroupId getGroupId()
TilePosition getTopLeft()
TilePosition getBottomRight()
TilePosition getBoundingBoxSize()
WalkPosition getWalkPositionWithHighestAltitude()
WalkPosition getTop()
getWalkPositionWithHighestAltitude()
Altitude getHighestAltitude()
int getSize()
int getLowGroundPercentage()
int getHighGroundPercentage()
int getVeryHighGroundPercentage()
java.util.List<ChokePoint> getChokePoints()
getChokePoints(Area)
java.util.List<ChokePoint> getChokePoints(Area area)
area
- the specified areajava.util.Map<Area,java.util.List<ChokePoint>> getChokePointsByArea()
java.util.List<Area> getAccessibleNeighbors()
ChokePoint.isBlocked()
boolean isAccessibleFrom(Area area)
area
- the specified areagetGroupId()
java.util.List<Mineral> getMinerals()
java.util.List<Geyser> getGeysers()
java.util.List<Base> getBases()