| Constructor and Description |
|---|
MapDataImpl(int tileWidth,
int tileHeight,
java.util.List<TilePosition> startingLocations) |
| Modifier and Type | Method and Description |
|---|---|
Position |
crop(Position position)
Returns a cropped version of the specified position if it is not inside the map.
|
TilePosition |
crop(TilePosition tilePosition)
Returns a cropped version of the specified position if it is not inside the map.
|
WalkPosition |
crop(WalkPosition walkPosition)
Returns a cropped version of the specified position if it is not inside the map.
|
Position |
getCenter()
Returns the center of the map in pixels.
|
Position |
getPixelSize()
Returns the size of the map in pixels.
|
Position |
getRandomPosition()
Returns a random position on the map in pixels.
|
java.util.List<TilePosition> |
getStartingLocations()
Returns the internal container of the starting Locations.
Note: these correspond to BWAPI::getStartLocations(). |
TilePosition |
getTileSize()
Returns the size of the map in tiles.
|
WalkPosition |
getWalkSize()
Returns the size of the map in walktiles.
|
boolean |
isValid(Position position)
Tests whether the specified position is inside the map.
|
boolean |
isValid(TilePosition tilePosition)
Tests whether the specified position is inside the map.
|
boolean |
isValid(WalkPosition walkPosition)
Tests whether the specified position is inside the map.
|
public MapDataImpl(int tileWidth,
int tileHeight,
java.util.List<TilePosition> startingLocations)
public TilePosition getTileSize()
MapDatagetTileSize in interface MapDatapublic WalkPosition getWalkSize()
MapDatagetWalkSize in interface MapDatapublic Position getPixelSize()
MapDatagetPixelSize in interface MapDatapublic Position getCenter()
MapDatapublic java.util.List<TilePosition> getStartingLocations()
MapDatagetStartingLocations in interface MapDatapublic boolean isValid(TilePosition tilePosition)
MapDatapublic boolean isValid(WalkPosition walkPosition)
MapDatapublic boolean isValid(Position position)
MapDatapublic TilePosition crop(TilePosition tilePosition)
MapDatapublic WalkPosition crop(WalkPosition walkPosition)
MapDatapublic Position crop(Position position)
MapDatapublic Position getRandomPosition()
MapDatagetRandomPosition in interface MapData