|
TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Manages and updates per-tile data. More...
#include <tilesinfo.h>
Classes | |
| struct | TileOccupyingBuilding |
Public Member Functions | |
| TilesInfo (State *state_) | |
| TilesInfo (TilesInfo const &)=delete | |
| TilesInfo & | operator= (TilesInfo const &)=delete |
| void | preUnitsUpdate () |
| void | postUnitsUpdate () |
| unsigned | mapTileWidth () const |
| unsigned | mapTileHeight () const |
| Tile & | getTile (int walkX, int walkY) |
| const Tile & | getTile (int walkX, int walkY) const |
| Tile * | tryGetTile (int walkX, int walkY) |
| const Tile * | tryGetTile (int walkX, int walkY) const |
| void | reserveArea (const BuildType *type, int walkX, int walkY) |
| This sets reservedAsUnbuildable in the tiles that would be occupied by the specified building at the specified build location (upper left corner coordinates). More... | |
| void | unreserveArea (const BuildType *type, int walkX, int walkY) |
Public Attributes | |
| std::vector< Tile > | tiles |
| All the tiles. More... | |
Static Public Attributes | |
| static const unsigned | tilesWidth = 256 |
| static const unsigned | tilesHeight = 256 |
Protected Attributes | |
| unsigned | mapTileWidth_ = 0 |
| unsigned | mapTileHeight_ = 0 |
| std::unordered_map< const Unit *, TileOccupyingBuilding > | tileOccupyingBuildings_ |
| State * | state_ = nullptr |
| FrameNum | lastSlowTileUpdate_ = 0 |
| FrameNum | lastUpdateBuildings_ = 0 |
| FrameNum | lastFowCreepUpdate_ = 0 |
Manages and updates per-tile data.
| cherrypi::TilesInfo::TilesInfo | ( | State * | state_ | ) |
|
delete |
| Tile & cherrypi::TilesInfo::getTile | ( | int | walkX, |
| int | walkY | ||
| ) |
| const Tile & cherrypi::TilesInfo::getTile | ( | int | walkX, |
| int | walkY | ||
| ) | const |
|
inline |
|
inline |
| void cherrypi::TilesInfo::postUnitsUpdate | ( | ) |
| void cherrypi::TilesInfo::preUnitsUpdate | ( | ) |
| void cherrypi::TilesInfo::reserveArea | ( | const BuildType * | type, |
| int | walkX, | ||
| int | walkY | ||
| ) |
This sets reservedAsUnbuildable in the tiles that would be occupied by the specified building at the specified build location (upper left corner coordinates).
Should only be used by BuilderModule.
| Tile * cherrypi::TilesInfo::tryGetTile | ( | int | walkX, |
| int | walkY | ||
| ) |
| const Tile * cherrypi::TilesInfo::tryGetTile | ( | int | walkX, |
| int | walkY | ||
| ) | const |
| void cherrypi::TilesInfo::unreserveArea | ( | const BuildType * | type, |
| int | walkX, | ||
| int | walkY | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| std::vector<Tile> cherrypi::TilesInfo::tiles |
All the tiles.
Prefer to use getTile, this is only here in case it is needed for performance.
|
static |
|
static |
1.8.11