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()
Neutralpublic Position getCenter()
Neutralpublic TilePosition getTopLeft()
NeutralgetTopLeft in interface Neutralpublic TilePosition getBottomRight()
NeutralgetBottomRight in interface Neutralpublic TilePosition getSize()
Neutralpublic boolean isBlocking()
NeutralisBlocking in interface Neutralpublic java.util.List<Area> getBlockedAreas()
NeutralgetBlockedAreas in interface Neutralpublic Neutral getNextStacked()
Neutralfor (const Neutral * n = Map::GetTile(topLeft()).GetNeutral() ; n ; n = n->nextStacked())
getNextStacked in interface Neutralpublic Neutral getLastStacked()
NeutralgetLastStacked in interface Neutralpublic 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.Objectpublic int hashCode()
hashCode in class java.lang.Object