Constructor and Description |
---|
BaseImpl(Area area,
TilePosition location,
java.util.List<Resource> assignedResources,
java.util.List<Mineral> blockingMinerals) |
Modifier and Type | Method and Description |
---|---|
void |
assignStartingLocation(TilePosition actualLocation) |
boolean |
equals(java.lang.Object object) |
Area |
getArea()
Returns the area in which this base is located.
|
java.util.List<Mineral> |
getBlockingMinerals()
Returns the blocking minerals.
- These are special minerals. |
Position |
getCenter()
Returns the center position of
Base.getLocation() . |
java.util.List<Geyser> |
getGeysers()
Returns the available geysers.
- These geysers are assigned to this Base (it is guaranteed that no other Base provides them). |
TilePosition |
getLocation()
Returns the position (top-left TilePosition) of the location for a resource depot.
- Note: If Base.isStartingLocation() == true, it is guaranteed that the location
corresponds exactly to one of MapData.getStartingLocations() . |
java.util.List<Mineral> |
getMinerals()
Returns the available minerals.
- These minerals are assigned to this base (it is guaranteed that no other base provides them). |
int |
hashCode() |
boolean |
isStartingLocation()
Tests whether this base is a start location.
- Note: all players start at locations taken from MapData.getStartingLocations() ,which doesn't mean all the locations in MapData.getStartingLocations() are actually
used. |
void |
onMineralDestroyed(Mineral mineral) |
public BaseImpl(Area area, TilePosition location, java.util.List<Resource> assignedResources, java.util.List<Mineral> blockingMinerals)
public boolean isStartingLocation()
Base
MapData.getStartingLocations()
,MapData.getStartingLocations()
are actually
used.isStartingLocation
in interface Base
public Area getArea()
Base
public TilePosition getLocation()
Base
Base.isStartingLocation()
== true, it is guaranteed that the location
corresponds exactly to one of MapData.getStartingLocations()
.getLocation
in interface Base
public Position getCenter()
Base
Base.getLocation()
.public java.util.List<Mineral> getMinerals()
Base
getMinerals
in interface Base
public java.util.List<Geyser> getGeysers()
Base
getGeysers
in interface Base
public java.util.List<Mineral> getBlockingMinerals()
Base
Base.isStartingLocation()
== true, an empty list is returned.Base.getBlockingMinerals()
should not be confused with ChokePoint.getBlockingNeutral()
and Neutral.isBlocking()
:getBlockingMinerals
in interface Base
public void assignStartingLocation(TilePosition actualLocation)
public void onMineralDestroyed(Mineral mineral)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object