public abstract class AreaImpl extends java.lang.Object implements Area
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Area> |
accessibleNeighbors |
protected java.util.List<Base> |
bases |
protected TilePosition |
bottomRight |
protected int |
buildableTileCount |
protected java.util.List<ChokePoint> |
chokePoints |
protected java.util.Map<Area,java.util.List<ChokePoint>> |
chokePointsByArea |
protected java.util.List<Geyser> |
geysers |
protected GroupId |
groupId |
protected Altitude |
highestAltitude |
protected int |
highGroundTileCount |
protected java.util.List<Mineral> |
minerals |
protected int |
tileCount |
protected TilePosition |
topLeft |
protected int |
veryHighGroundTileCount |
| Modifier | Constructor and Description |
|---|---|
protected |
AreaImpl(AreaId areaId,
WalkPosition top,
int miniTileCount) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
java.util.List<Area> |
getAccessibleNeighbors()
Returns the accessible neighboring Areas.
|
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.
|
java.util.List<ChokePoint> |
getChokePoints(Area area)
Returns the ChokePoints between this Area and the specified area.
|
java.util.Map<Area,java.util.List<ChokePoint>> |
getChokePointsByArea()
Returns the ChokePoints of this Area grouped by neighboring Areas. - Note: if there are no
neighboring Areas, than an empty set is returned.
|
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.
|
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()
|
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.
|
int |
hashCode() |
boolean |
isAccessibleFrom(Area area)
Returns whether this Area is accessible from the specified area, that is, if they share the
same GroupId().
|
void |
onMineralDestroyed(Mineral mineral) |
protected GroupId groupId
protected Altitude highestAltitude
protected TilePosition topLeft
protected TilePosition bottomRight
protected int tileCount
protected int buildableTileCount
protected int highGroundTileCount
protected int veryHighGroundTileCount
protected final java.util.Map<Area,java.util.List<ChokePoint>> chokePointsByArea
protected final java.util.List<Area> accessibleNeighbors
protected final java.util.List<ChokePoint> chokePoints
protected final java.util.List<Mineral> minerals
protected final java.util.List<Geyser> geysers
protected final java.util.List<Base> bases
protected AreaImpl(AreaId areaId, WalkPosition top, int miniTileCount)
public AreaId getId()
Areapublic GroupId getGroupId()
AreagetGroupId in interface Areapublic TilePosition getTopLeft()
AreagetTopLeft in interface Areapublic TilePosition getBottomRight()
AreagetBottomRight in interface Areapublic TilePosition getBoundingBoxSize()
AreagetBoundingBoxSize in interface Areapublic WalkPosition getWalkPositionWithHighestAltitude()
AreagetWalkPositionWithHighestAltitude in interface Areapublic WalkPosition getTop()
Areapublic Altitude getHighestAltitude()
AreagetHighestAltitude in interface Areapublic int getSize()
Areapublic int getLowGroundPercentage()
AreagetLowGroundPercentage in interface Areapublic int getHighGroundPercentage()
AreagetHighGroundPercentage in interface Areapublic int getVeryHighGroundPercentage()
AreagetVeryHighGroundPercentage in interface Areapublic java.util.List<ChokePoint> getChokePoints()
AreagetChokePoints in interface AreaArea.getChokePoints(Area)public java.util.List<ChokePoint> getChokePoints(Area area)
AreagetChokePoints in interface Areaarea - the specified areapublic java.util.Map<Area,java.util.List<ChokePoint>> getChokePointsByArea()
AreagetChokePointsByArea in interface Areapublic java.util.List<Area> getAccessibleNeighbors()
AreagetAccessibleNeighbors in interface AreaChokePoint.isBlocked()public boolean isAccessibleFrom(Area area)
AreaisAccessibleFrom in interface Areaarea - the specified areaArea.getGroupId()public java.util.List<Mineral> getMinerals()
AreagetMinerals in interface Areapublic java.util.List<Geyser> getGeysers()
AreagetGeysers in interface Areapublic java.util.List<Base> getBases()
Areapublic void onMineralDestroyed(Mineral mineral)
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object