public abstract class NeutralImpl extends java.lang.Object implements Neutral
Modifier | Constructor and Description |
---|---|
protected |
NeutralImpl(Unit unit,
Map map) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
java.util.List<Area> |
getBlockedAreas()
If blocking() == true, returns the set of areas blocked by this Neutral.
|
TilePosition |
getBottomRight()
Returns the bottom right Tile position of this Neutral
|
Position |
getCenter()
Returns the center of this Neutral, in pixels (same as unit()->getInitialPosition()).
|
Neutral |
getLastStacked()
Returns the last Neutral stacked over this Neutral, if ever.
|
protected Map |
getMap() |
Neutral |
getNextStacked()
Returns the next Neutral stacked over this Neutral, if ever.
- To iterate through the whole stack, one can use the following: for (const Neutral * n = Map::GetTile(topLeft()).GetNeutral() ; n ; n = n->nextStacked())
|
TilePosition |
getSize()
Returns the size of this Neutral, in Tiles (same as Type()->tileSize())
|
TilePosition |
getTopLeft()
Returns the top left Tile position of this Neutral (same as unit()->getInitialTilePosition()).
|
Unit |
getUnit()
Returns the BWAPI::Unit this Neutral is wrapping around.
|
int |
hashCode() |
boolean |
isBlocking()
Tells whether this Neutral is blocking some ChokePoint.
- This applies to minerals and StaticBuildings only. - For each blocking Neutral, a pseudo ChokePoint (which is blocked()) is created on top of it, with the exception of stacked blocking Neutrals for which only one pseudo ChokePoint is created. - Cf. |
boolean |
isSameUnitTypeAs(Neutral neutral) |
void |
setBlocking(java.util.List<WalkPosition> blockedAreas) |
void |
simulateCPPObjectDestructor() |
public void simulateCPPObjectDestructor()
public Unit getUnit()
Neutral
public Position getCenter()
Neutral
public TilePosition getTopLeft()
Neutral
getTopLeft
in interface Neutral
public TilePosition getBottomRight()
Neutral
getBottomRight
in interface Neutral
public TilePosition getSize()
Neutral
public boolean isBlocking()
Neutral
isBlocking
in interface Neutral
public java.util.List<Area> getBlockedAreas()
Neutral
getBlockedAreas
in interface Neutral
public Neutral getNextStacked()
Neutral
for (const Neutral * n = Map::GetTile(topLeft()).GetNeutral() ; n ; n = n->nextStacked())
getNextStacked
in interface Neutral
public Neutral getLastStacked()
Neutral
getLastStacked
in interface Neutral
public void setBlocking(java.util.List<WalkPosition> blockedAreas)
public boolean isSameUnitTypeAs(Neutral neutral)
protected Map getMap()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object