public interface MiniTile
TerrainData.getMiniTile(WalkPosition)
Modifier and Type | Method and Description |
---|---|
Altitude |
getAltitude()
Distance in pixels between the center of this MiniTile and the center of the nearest
Sea-MiniTile
- Sea-miniTiles all have their Altitude() equal to 0. - miniTiles having Altitude() > 0 are not Sea-miniTiles. |
AreaId |
getAreaId()
For Sea and Lake miniTiles, returns 0
For Terrain miniTiles, returns a non zero id: - if (id > 0), id uniquely identifies the Area A that contains this MiniTile. Moreover we have: A.id() == id and Map::getArea(id) == A - For more information about positive Area::ids, see Area::id() - if (id < 0), then this MiniTile is part of a Terrain-zone that was considered too small to create an Area for it. - Note: negative Area::ids start from -2 - Note: because of the lakes, Map::getNearestArea should be prefered over Map::getArea. |
boolean |
isLake()
Lake-miniTiles are unwalkable miniTiles that have their Altitude() > 0.
- They form small zones (inside Terrain-zones) that can be eaysily walked around (e.g. |
boolean |
isSea()
Sea-miniTiles are unwalkable miniTiles that have their altitude equal to 0.
|
boolean |
isTerrain()
Terrain miniTiles are just walkable miniTiles
|
boolean |
isWalkable()
Corresponds approximatively to BWAPI::isWalkable
The differences are: - For each BWAPI's unwalkable MiniTile, we also mark its 8 neighbors as not walkable. According to some tests, this prevents from wrongly pretending one small unit can go by some thin path. - The relation buildable ==> walkable is enforced, by marking as walkable any MiniTile part of a buildable Tile (Cf. |
boolean isWalkable()
Tile.isBuildable()
)Altitude getAltitude()
boolean isSea()
boolean isLake()
boolean isTerrain()
AreaId getAreaId()