TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | List of all members
tcbwapi::TCGame Class Reference

#include <tcgame.h>

Inherits Game.

Public Member Functions

 TCGame ()
 
virtual ~TCGame ()
 
void setState (torchcraft::State *s)
 
bool isWalkable (int walkX, int walkY) const override
 
int getGroundHeight (int tileX, int tileY) const override
 
bool isBuildable (int tileX, int tileY, bool includeBuildings=false) const override
 
BWAPI::Unitset const & getStaticNeutralUnits () const override
 
BWAPI::TilePosition::list const & getStartLocations () const override
 
int mapWidth () const override
 
int mapHeight () const override
 
BWAPI::Unit getUnit (int unitID) const override
 
const BWAPI::Forceset & getForces () const override
 
const BWAPI::Playerset & getPlayers () const override
 
const BWAPI::Unitset & getAllUnits () const override
 
const BWAPI::Unitset & getMinerals () const override
 
const BWAPI::Unitset & getGeysers () const override
 
const BWAPI::Unitset & getNeutralUnits () const override
 
const BWAPI::Unitset & getStaticMinerals () const override
 
const BWAPI::Unitset & getStaticGeysers () const override
 
const BWAPI::Bulletset & getBullets () const override
 
const BWAPI::Position::list & getNukeDots () const override
 
const std::list< BWAPI::Event > & getEvents () const override
 
BWAPI::Force getForce (int forceID) const override
 
BWAPI::Player getPlayer (int playerID) const override
 
BWAPI::Unit indexToUnit (int unitIndex) const override
 
BWAPI::Region getRegion (int regionID) const override
 
BWAPI::GameType getGameType () const override
 
int getLatency () const override
 
int getFrameCount () const override
 
int getReplayFrameCount () const override
 
int getFPS () const override
 static int bestFPS override { throwNotImplemented(); } More...
 
double getAverageFPS () const override
 
BWAPI::Position getMousePosition () const override
 
bool getMouseState (BWAPI::MouseButton button) const override
 
bool getKeyState (BWAPI::Key key) const override
 
BWAPI::Position getScreenPosition () const override
 
void setScreenPosition (int x, int y) override
 
void pingMinimap (int x, int y) override
 
bool isFlagEnabled (int flag) const override
 
void enableFlag (int flag) override
 
BWAPI::Unitset getUnitsInRectangle (int left, int top, int right, int bottom, const BWAPI::UnitFilter &pred=nullptr) const override
 
BWAPI::Unit getClosestUnitInRectangle (BWAPI::Position center, const BWAPI::UnitFilter &pred=nullptr, int left=0, int top=0, int right=999999, int bottom=999999) const override
 
BWAPI::Unit getBestUnit (const BWAPI::BestUnitFilter &best, const BWAPI::UnitFilter &pred, BWAPI::Position center=BWAPI::Positions::Origin, int radius=999999) const override
 
BWAPI::Error getLastError () const override
 
bool setLastError (BWAPI::Error e=BWAPI::Errors::None) const override
 
std::string mapFileName () const override
 
std::string mapPathName () const override
 
std::string mapName () const override
 
std::string mapHash () const override
 
bool isVisible (int tileX, int tileY) const override
 
bool isExplored (int tileX, int tileY) const override
 
bool hasCreep (int tileX, int tileY) const override
 
bool hasPowerPrecise (int x, int y, BWAPI::UnitType unitType=BWAPI::UnitTypes::None) const override
 
bool canBuildHere (BWAPI::TilePosition position, BWAPI::UnitType type, BWAPI::Unit builder=nullptr, bool checkExplored=false) override
 
bool canMake (BWAPI::UnitType type, BWAPI::Unit builder=nullptr) const override
 
bool canResearch (BWAPI::TechType type, BWAPI::Unit unit=nullptr, bool checkCanIssueCommandType=true) override
 
bool canUpgrade (BWAPI::UpgradeType type, BWAPI::Unit unit=nullptr, bool checkCanIssueCommandType=true) override
 
void vPrintf (const char *format, va_list args) override
 
void vSendTextEx (bool toAllies, const char *format, va_list args) override
 
bool isInGame () const override
 
bool isMultiplayer () const override
 
bool isBattleNet () const override
 
bool isPaused () const override
 
bool isReplay () const override
 
void pauseGame () override
 
void resumeGame () override
 
void leaveGame () override
 
void restartGame () override
 
void setLocalSpeed (int speed) override
 
bool issueCommand (const BWAPI::Unitset &units, BWAPI::UnitCommand command) override
 
const BWAPI::Unitset & getSelectedUnits () const override
 
BWAPI::Player self () const override
 
BWAPI::Player enemy () const override
 
BWAPI::Player neutral () const override
 
BWAPI::Playerset & allies () override
 
BWAPI::Playerset & enemies () override
 
BWAPI::Playerset & observers () override
 
void setTextSize (BWAPI::Text::Size::Enum size=BWAPI::Text::Size::Default) override
 
void vDrawText (BWAPI::CoordinateType::Enum ctype, int x, int y, const char *format, va_list arg) override
 
void drawBox (BWAPI::CoordinateType::Enum ctype, int left, int top, int right, int bottom, BWAPI::Color color, bool isSolid=false) override
 
void drawTriangle (BWAPI::CoordinateType::Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, BWAPI::Color color, bool isSolid=false) override
 
void drawCircle (BWAPI::CoordinateType::Enum ctype, int x, int y, int radius, BWAPI::Color color, bool isSolid=false) override
 
void drawEllipse (BWAPI::CoordinateType::Enum ctype, int x, int y, int xrad, int yrad, BWAPI::Color color, bool isSolid=false) override
 
void drawDot (BWAPI::CoordinateType::Enum ctype, int x, int y, BWAPI::Color color) override
 
void drawLine (BWAPI::CoordinateType::Enum ctype, int x1, int y1, int x2, int y2, BWAPI::Color color) override
 
int getLatencyFrames () const override
 
int getLatencyTime () const override
 
int getRemainingLatencyFrames () const override
 
int getRemainingLatencyTime () const override
 
int getRevision () const override
 
int getClientVersion () const override
 
bool isDebug () const override
 
bool isLatComEnabled () const override
 
void setLatCom (bool isEnabled) override
 
bool isGUIEnabled () const override
 
void setGUI (bool enabled) override
 
int getInstanceNumber () const override
 
int getAPM (bool includeSelects=false) const override
 
bool setMap (const char *mapFileName) override
 
void setFrameSkip (int frameSkip) override
 
bool setAlliance (BWAPI::Player player, bool allied=true, bool alliedVictory=true) override
 
bool setVision (BWAPI::Player player, bool enabled=true) override
 
int elapsedTime () const override
 
void setCommandOptimizationLevel (int level) override
 
int countdownTimer () const override
 
const BWAPI::Regionset & getAllRegions () const override
 
BWAPI::Region getRegionAt (int x, int y) const override
 
int getLastEventTime () const override
 
bool setRevealAll (bool reveal=true) override
 
unsigned getRandomSeed () const override
 

Constructor & Destructor Documentation

tcbwapi::TCGame::TCGame ( )
inline
tcbwapi::TCGame::~TCGame ( )
virtual

Member Function Documentation

BWAPI::Playerset& tcbwapi::TCGame::allies ( )
inlineoverride
bool tcbwapi::TCGame::canBuildHere ( BWAPI::TilePosition  position,
BWAPI::UnitType  type,
BWAPI::Unit  builder = nullptr,
bool  checkExplored = false 
)
inlineoverride
bool tcbwapi::TCGame::canMake ( BWAPI::UnitType  type,
BWAPI::Unit  builder = nullptr 
) const
inlineoverride
bool tcbwapi::TCGame::canResearch ( BWAPI::TechType  type,
BWAPI::Unit  unit = nullptr,
bool  checkCanIssueCommandType = true 
)
inlineoverride
bool tcbwapi::TCGame::canUpgrade ( BWAPI::UpgradeType  type,
BWAPI::Unit  unit = nullptr,
bool  checkCanIssueCommandType = true 
)
inlineoverride
int tcbwapi::TCGame::countdownTimer ( ) const
inlineoverride
void tcbwapi::TCGame::drawBox ( BWAPI::CoordinateType::Enum  ctype,
int  left,
int  top,
int  right,
int  bottom,
BWAPI::Color  color,
bool  isSolid = false 
)
inlineoverride
void tcbwapi::TCGame::drawCircle ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
int  radius,
BWAPI::Color  color,
bool  isSolid = false 
)
inlineoverride
void tcbwapi::TCGame::drawDot ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
BWAPI::Color  color 
)
inlineoverride
void tcbwapi::TCGame::drawEllipse ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
int  xrad,
int  yrad,
BWAPI::Color  color,
bool  isSolid = false 
)
inlineoverride
void tcbwapi::TCGame::drawLine ( BWAPI::CoordinateType::Enum  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
BWAPI::Color  color 
)
inlineoverride
void tcbwapi::TCGame::drawTriangle ( BWAPI::CoordinateType::Enum  ctype,
int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
BWAPI::Color  color,
bool  isSolid = false 
)
inlineoverride
int tcbwapi::TCGame::elapsedTime ( ) const
inlineoverride
void tcbwapi::TCGame::enableFlag ( int  flag)
inlineoverride
BWAPI::Playerset& tcbwapi::TCGame::enemies ( )
inlineoverride
BWAPI::Player tcbwapi::TCGame::enemy ( ) const
inlineoverride
const BWAPI::Regionset& tcbwapi::TCGame::getAllRegions ( ) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getAllUnits ( ) const
inlineoverride
int tcbwapi::TCGame::getAPM ( bool  includeSelects = false) const
inlineoverride
double tcbwapi::TCGame::getAverageFPS ( ) const
inlineoverride
BWAPI::Unit tcbwapi::TCGame::getBestUnit ( const BWAPI::BestUnitFilter &  best,
const BWAPI::UnitFilter &  pred,
BWAPI::Position  center = BWAPI::Positions::Origin,
int  radius = 999999 
) const
inlineoverride
const BWAPI::Bulletset& tcbwapi::TCGame::getBullets ( ) const
inlineoverride
int tcbwapi::TCGame::getClientVersion ( ) const
inlineoverride
BWAPI::Unit tcbwapi::TCGame::getClosestUnitInRectangle ( BWAPI::Position  center,
const BWAPI::UnitFilter &  pred = nullptr,
int  left = 0,
int  top = 0,
int  right = 999999,
int  bottom = 999999 
) const
inlineoverride
const std::list<BWAPI::Event>& tcbwapi::TCGame::getEvents ( ) const
inlineoverride
BWAPI::Force tcbwapi::TCGame::getForce ( int  forceID) const
inlineoverride
const BWAPI::Forceset& tcbwapi::TCGame::getForces ( ) const
inlineoverride
int tcbwapi::TCGame::getFPS ( ) const
inlineoverride

static int bestFPS override { throwNotImplemented(); }

int tcbwapi::TCGame::getFrameCount ( ) const
inlineoverride
BWAPI::GameType tcbwapi::TCGame::getGameType ( ) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getGeysers ( ) const
inlineoverride
int tcbwapi::TCGame::getGroundHeight ( int  tileX,
int  tileY 
) const
override
int tcbwapi::TCGame::getInstanceNumber ( ) const
inlineoverride
bool tcbwapi::TCGame::getKeyState ( BWAPI::Key  key) const
inlineoverride
BWAPI::Error tcbwapi::TCGame::getLastError ( ) const
inlineoverride
int tcbwapi::TCGame::getLastEventTime ( ) const
inlineoverride
int tcbwapi::TCGame::getLatency ( ) const
inlineoverride
int tcbwapi::TCGame::getLatencyFrames ( ) const
inlineoverride
int tcbwapi::TCGame::getLatencyTime ( ) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getMinerals ( ) const
inlineoverride
BWAPI::Position tcbwapi::TCGame::getMousePosition ( ) const
inlineoverride
bool tcbwapi::TCGame::getMouseState ( BWAPI::MouseButton  button) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getNeutralUnits ( ) const
inlineoverride
const BWAPI::Position::list& tcbwapi::TCGame::getNukeDots ( ) const
inlineoverride
BWAPI::Player tcbwapi::TCGame::getPlayer ( int  playerID) const
inlineoverride
const BWAPI::Playerset& tcbwapi::TCGame::getPlayers ( ) const
inlineoverride
unsigned tcbwapi::TCGame::getRandomSeed ( ) const
inlineoverride
BWAPI::Region tcbwapi::TCGame::getRegion ( int  regionID) const
inlineoverride
BWAPI::Region tcbwapi::TCGame::getRegionAt ( int  x,
int  y 
) const
inlineoverride
int tcbwapi::TCGame::getRemainingLatencyFrames ( ) const
inlineoverride
int tcbwapi::TCGame::getRemainingLatencyTime ( ) const
inlineoverride
int tcbwapi::TCGame::getReplayFrameCount ( ) const
inlineoverride
int tcbwapi::TCGame::getRevision ( ) const
inlineoverride
BWAPI::Position tcbwapi::TCGame::getScreenPosition ( ) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getSelectedUnits ( ) const
inlineoverride
BWAPI::TilePosition::list const & tcbwapi::TCGame::getStartLocations ( ) const
override
const BWAPI::Unitset& tcbwapi::TCGame::getStaticGeysers ( ) const
inlineoverride
const BWAPI::Unitset& tcbwapi::TCGame::getStaticMinerals ( ) const
inlineoverride
BWAPI::Unitset const & tcbwapi::TCGame::getStaticNeutralUnits ( ) const
override
BWAPI::Unit tcbwapi::TCGame::getUnit ( int  unitID) const
override
BWAPI::Unitset tcbwapi::TCGame::getUnitsInRectangle ( int  left,
int  top,
int  right,
int  bottom,
const BWAPI::UnitFilter &  pred = nullptr 
) const
inlineoverride
bool tcbwapi::TCGame::hasCreep ( int  tileX,
int  tileY 
) const
inlineoverride
bool tcbwapi::TCGame::hasPowerPrecise ( int  x,
int  y,
BWAPI::UnitType  unitType = BWAPI::UnitTypes::None 
) const
inlineoverride
BWAPI::Unit tcbwapi::TCGame::indexToUnit ( int  unitIndex) const
inlineoverride
bool tcbwapi::TCGame::isBattleNet ( ) const
inlineoverride
bool tcbwapi::TCGame::isBuildable ( int  tileX,
int  tileY,
bool  includeBuildings = false 
) const
override
bool tcbwapi::TCGame::isDebug ( ) const
inlineoverride
bool tcbwapi::TCGame::isExplored ( int  tileX,
int  tileY 
) const
inlineoverride
bool tcbwapi::TCGame::isFlagEnabled ( int  flag) const
inlineoverride
bool tcbwapi::TCGame::isGUIEnabled ( ) const
inlineoverride
bool tcbwapi::TCGame::isInGame ( ) const
inlineoverride
bool tcbwapi::TCGame::isLatComEnabled ( ) const
inlineoverride
bool tcbwapi::TCGame::isMultiplayer ( ) const
inlineoverride
bool tcbwapi::TCGame::isPaused ( ) const
inlineoverride
bool tcbwapi::TCGame::isReplay ( ) const
inlineoverride
bool tcbwapi::TCGame::issueCommand ( const BWAPI::Unitset &  units,
BWAPI::UnitCommand  command 
)
inlineoverride
bool tcbwapi::TCGame::isVisible ( int  tileX,
int  tileY 
) const
inlineoverride
bool tcbwapi::TCGame::isWalkable ( int  walkX,
int  walkY 
) const
override
void tcbwapi::TCGame::leaveGame ( )
inlineoverride
std::string tcbwapi::TCGame::mapFileName ( ) const
inlineoverride
std::string tcbwapi::TCGame::mapHash ( ) const
inlineoverride
int tcbwapi::TCGame::mapHeight ( ) const
override
std::string tcbwapi::TCGame::mapName ( ) const
inlineoverride
std::string tcbwapi::TCGame::mapPathName ( ) const
inlineoverride
int tcbwapi::TCGame::mapWidth ( ) const
override
BWAPI::Player tcbwapi::TCGame::neutral ( ) const
inlineoverride
BWAPI::Playerset& tcbwapi::TCGame::observers ( )
inlineoverride
void tcbwapi::TCGame::pauseGame ( )
inlineoverride
void tcbwapi::TCGame::pingMinimap ( int  x,
int  y 
)
inlineoverride
void tcbwapi::TCGame::restartGame ( )
inlineoverride
void tcbwapi::TCGame::resumeGame ( )
inlineoverride
BWAPI::Player tcbwapi::TCGame::self ( ) const
inlineoverride
bool tcbwapi::TCGame::setAlliance ( BWAPI::Player  player,
bool  allied = true,
bool  alliedVictory = true 
)
inlineoverride
void tcbwapi::TCGame::setCommandOptimizationLevel ( int  level)
inlineoverride
void tcbwapi::TCGame::setFrameSkip ( int  frameSkip)
inlineoverride
void tcbwapi::TCGame::setGUI ( bool  enabled)
inlineoverride
bool tcbwapi::TCGame::setLastError ( BWAPI::Error  e = BWAPI::Errors::None) const
inlineoverride
void tcbwapi::TCGame::setLatCom ( bool  isEnabled)
inlineoverride
void tcbwapi::TCGame::setLocalSpeed ( int  speed)
inlineoverride
bool tcbwapi::TCGame::setMap ( const char *  mapFileName)
inlineoverride
bool tcbwapi::TCGame::setRevealAll ( bool  reveal = true)
inlineoverride
void tcbwapi::TCGame::setScreenPosition ( int  x,
int  y 
)
inlineoverride
void tcbwapi::TCGame::setState ( torchcraft::State s)
void tcbwapi::TCGame::setTextSize ( BWAPI::Text::Size::Enum  size = BWAPI::Text::Size::Default)
inlineoverride
bool tcbwapi::TCGame::setVision ( BWAPI::Player  player,
bool  enabled = true 
)
inlineoverride
void tcbwapi::TCGame::vDrawText ( BWAPI::CoordinateType::Enum  ctype,
int  x,
int  y,
const char *  format,
va_list  arg 
)
inlineoverride
void tcbwapi::TCGame::vPrintf ( const char *  format,
va_list  args 
)
inlineoverride
void tcbwapi::TCGame::vSendTextEx ( bool  toAllies,
const char *  format,
va_list  args 
)
inlineoverride

The documentation for this class was generated from the following files: