BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Public Attributes
BWAPI::GameImpl Class Reference

#include <GameImpl.h>

Inheritance diagram for BWAPI::GameImpl:
Inheritance graph
[legend]
Collaboration diagram for BWAPI::GameImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual std::set< Force * > & getForces ()
virtual std::set< Player * > & getPlayers ()
virtual std::set< Unit * > & getAllUnits ()
virtual std::set< Unit * > & getMinerals ()
virtual std::set< Unit * > & getGeysers ()
virtual std::set< Unit * > & getNeutralUnits ()
virtual std::set< Unit * > & getStaticMinerals ()
virtual std::set< Unit * > & getStaticGeysers ()
virtual std::set< Unit * > & getStaticNeutralUnits ()
virtual std::set< Bullet * > & getBullets ()
virtual std::set< Position > & getNukeDots ()
virtual std::list< Event > & getEvents ()
virtual ForcegetForce (int forceID)
virtual PlayergetPlayer (int playerID)
virtual UnitgetUnit (int unitID)
virtual UnitindexToUnit (int unitIndex)
virtual RegiongetRegion (int regionID)
virtual GameType getGameType ()
virtual int getLatency ()
virtual int getFrameCount ()
virtual int getReplayFrameCount ()
virtual int getFPS ()
virtual double getAverageFPS ()
virtual Position getMousePosition ()
virtual bool getMouseState (MouseButton button)
virtual bool getMouseState (int button)
virtual bool getKeyState (Key key)
bool getKeyState (int key)
virtual Position getScreenPosition ()
virtual void setScreenPosition (int x, int y)
virtual void setScreenPosition (BWAPI::Position p)
virtual void pingMinimap (int x, int y)
virtual void pingMinimap (BWAPI::Position p)
virtual bool isFlagEnabled (int flag)
virtual void enableFlag (int flag)
virtual std::set< Unit * > & getUnitsOnTile (int x, int y)
virtual std::set< Unit * > & getUnitsInRectangle (int left, int top, int right, int bottom) const
virtual std::set< Unit * > & getUnitsInRectangle (BWAPI::Position topLeft, BWAPI::Position bottomRight) const
virtual std::set< Unit * > & getUnitsInRadius (BWAPI::Position center, int radius) const
virtual Error getLastError () const
virtual bool setLastError (BWAPI::Error e)
virtual int mapWidth ()
virtual int mapHeight ()
virtual std::string mapFileName ()
virtual std::string mapPathName ()
virtual std::string mapName ()
virtual std::string mapHash ()
virtual bool isWalkable (int x, int y)
virtual int getGroundHeight (int x, int y)
virtual int getGroundHeight (TilePosition position)
virtual bool isBuildable (int x, int y, bool includeBuildings=false)
virtual bool isBuildable (TilePosition position, bool includeBuildings=false)
virtual bool isVisible (int x, int y)
virtual bool isVisible (TilePosition position)
virtual bool isExplored (int x, int y)
virtual bool isExplored (TilePosition position)
virtual bool hasCreep (int x, int y)
virtual bool hasCreep (TilePosition position)
virtual bool hasPower (int tileX, int tileY, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (TilePosition position, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (TilePosition position, int tileWidth, int tileHeight, UnitType unitType=UnitTypes::None) const
virtual bool hasPowerPrecise (int x, int y, UnitType unitType=UnitTypes::None) const
virtual bool hasPowerPrecise (Position position, UnitType unitType=UnitTypes::None) const
virtual bool canBuildHere (const Unit *builder, TilePosition position, UnitType type, bool checkExplored=false)
virtual bool canMake (const Unit *builder, UnitType type)
virtual bool canResearch (const Unit *unit, TechType type)
virtual bool canUpgrade (const Unit *unit, UpgradeType type)
virtual std::set< TilePosition > & getStartLocations ()
virtual void printf (const char *format,...)
virtual void sendText (const char *format,...)
virtual void sendTextEx (bool toAllies, const char *format,...)
virtual void changeRace (BWAPI::Race race)
virtual bool isInGame ()
virtual bool isMultiplayer ()
virtual bool isBattleNet ()
virtual bool isPaused ()
virtual bool isReplay ()
virtual void startGame ()
virtual void pauseGame ()
virtual void resumeGame ()
virtual void leaveGame ()
virtual void restartGame ()
virtual void setLocalSpeed (int speed=-1)
virtual bool issueCommand (const std::set< BWAPI::Unit * > &units, UnitCommand command)
virtual std::set< BWAPI::Unit * > & getSelectedUnits ()
virtual Playerself ()
virtual Playerenemy ()
virtual Playerneutral ()
virtual std::set
< BWAPI::Player * > & 
allies ()
virtual std::set
< BWAPI::Player * > & 
enemies ()
virtual std::set
< BWAPI::Player * > & 
observers ()
virtual void setTextSize (int size=1)
virtual void drawText (int ctype, int x, int y, const char *format,...)
virtual void drawTextMap (int x, int y, const char *format,...)
virtual void drawTextMouse (int x, int y, const char *format,...)
virtual void drawTextScreen (int x, int y, const char *format,...)
virtual void drawBox (int ctype, int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxMap (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxMouse (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxScreen (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawTriangle (int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleMap (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleMouse (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleScreen (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawCircle (int ctype, int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleMap (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleMouse (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleScreen (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawEllipse (int ctype, int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseMap (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseMouse (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseScreen (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawDot (int ctype, int x, int y, Color color)
virtual void drawDotMap (int x, int y, Color color)
virtual void drawDotMouse (int x, int y, Color color)
virtual void drawDotScreen (int x, int y, Color color)
virtual void drawLine (int ctype, int x1, int y1, int x2, int y2, Color color)
virtual void drawLineMap (int x1, int y1, int x2, int y2, Color color)
virtual void drawLineMouse (int x1, int y1, int x2, int y2, Color color)
virtual void drawLineScreen (int x1, int y1, int x2, int y2, Color color)
virtual void * getScreenBuffer ()
virtual int getLatencyFrames ()
virtual int getLatencyTime ()
virtual int getRemainingLatencyFrames ()
virtual int getRemainingLatencyTime ()
virtual int getRevision ()
virtual bool isDebug ()
virtual bool isLatComEnabled ()
virtual void setLatCom (bool isEnabled)
virtual bool isGUIEnabled ()
virtual void setGUI (bool enabled=true)
virtual int getInstanceNumber ()
virtual int getAPM (bool includeSelects=false)
virtual bool setMap (const char *mapFileName)
virtual void setFrameSkip (int frameSkip=1)
virtual bool hasPath (Position source, Position destination) const
virtual bool setAlliance (BWAPI::Player *player, bool allied=true, bool alliedVictory=true)
virtual bool setVision (BWAPI::Player *player, bool enabled=true)
virtual int elapsedTime () const
virtual void setCommandOptimizationLevel (int level=2)
virtual int countdownTimer () const
virtual const std::set
< BWAPI::Region * > & 
getAllRegions () const
virtual BWAPI::RegiongetRegionAt (int x, int y) const
virtual BWAPI::RegiongetRegionAt (BWAPI::Position position) const
virtual int getLastEventTime () const
virtual bool setReplayVision (BWAPI::Player *player, bool enabled=true)
virtual bool setRevealAll (bool reveal=true)
 GameImpl ()
 ~GameImpl ()
void update ()
void loadAutoMenuData ()
void onMenuFrame ()
PlayerImpl_getPlayer (int id)
int _currentPlayerId ()
void pressKey (int key)
void mouseDown (int x, int y)
void mouseUp (int x, int y)
void changeSlot (BW::Orders::ChangeSlot::Slot slot, u8 slotID)
void addToCommandBuffer (Command *command)
void onGameStart ()
void onGameEnd ()
int stormIdToPlayerId (int dwStormId)
void onSendText (const char *text)
void onReceiveText (int playerId, std::string text)
bool parseText (const char *text)
bool inScreen (int ctype, int x, int y)
bool inScreen (int ctype, int x1, int y1, int x2, int y2)
bool inScreen (int ctype, int x1, int y1, int x2, int y2, int x3, int y3)
void lockFlags ()
bool _isInGame () const
bool _isSinglePlayer () const
bool _isBattleNet ()
bool _isReplay () const
void _changeRace (int slot, BWAPI::Race race)
int _getLobbyRace (int slot)
void loadSelected ()
void copyMapToSharedMemory ()
void moveToSelectedUnits ()
void executeCommand (UnitCommand command, bool addCommandToLatComBuffer=true)
bool addToCommandOptimizer (UnitCommand command)
void chooseNewRandomMap ()
UnitImplgetUnitFromIndex (int index)
BulletImplgetBulletFromIndex (int index)
void onSaveGame (char *name)
void refreshSelectionStates ()
const GameDatagetGameData () const
int drawShapes ()
void processEvents ()
Unit_unitFromIndex (int index)
void dropPlayers ()
Event makeEvent (BWAPIC::Event e)
int addUnitCommand (BWAPIC::UnitCommand &c)
 GameImpl (GameData *data)
void onMatchStart ()
void onMatchEnd ()
void onMatchFrame ()
const GameDatagetGameData () const
Unit_unitFromIndex (int index)
virtual std::set< Force * > & getForces ()
virtual std::set< Player * > & getPlayers ()
virtual std::set< Unit * > & getAllUnits ()
virtual std::set< Unit * > & getMinerals ()
virtual std::set< Unit * > & getGeysers ()
virtual std::set< Unit * > & getNeutralUnits ()
virtual std::set< Unit * > & getStaticMinerals ()
virtual std::set< Unit * > & getStaticGeysers ()
virtual std::set< Unit * > & getStaticNeutralUnits ()
virtual std::set< Bullet * > & getBullets ()
virtual std::set< Position > & getNukeDots ()
virtual std::list< Event > & getEvents ()
virtual ForcegetForce (int forceID)
virtual PlayergetPlayer (int playerID)
virtual UnitgetUnit (int unitID)
virtual UnitindexToUnit (int unitIndex)
virtual RegiongetRegion (int regionID)
virtual GameType getGameType ()
virtual int getLatency ()
virtual int getFrameCount ()
virtual int getReplayFrameCount ()
virtual int getFPS ()
virtual double getAverageFPS ()
virtual BWAPI::Position getMousePosition ()
virtual bool getMouseState (MouseButton button)
virtual bool getMouseState (int button)
virtual bool getKeyState (Key key)
virtual bool getKeyState (int key)
virtual BWAPI::Position getScreenPosition ()
virtual void setScreenPosition (int x, int y)
virtual void setScreenPosition (BWAPI::Position p)
virtual void pingMinimap (int x, int y)
virtual void pingMinimap (BWAPI::Position p)
virtual bool isFlagEnabled (int flag)
virtual void enableFlag (int flag)
virtual std::set< Unit * > & getUnitsOnTile (int x, int y)
virtual std::set< Unit * > & getUnitsInRectangle (int left, int top, int right, int bottom) const
virtual std::set< Unit * > & getUnitsInRectangle (BWAPI::Position topLeft, BWAPI::Position bottomRight) const
virtual std::set< Unit * > & getUnitsInRadius (BWAPI::Position center, int radius) const
virtual Error getLastError () const
virtual bool setLastError (BWAPI::Error e)
virtual int mapWidth ()
virtual int mapHeight ()
virtual std::string mapFileName ()
virtual std::string mapPathName ()
virtual std::string mapName ()
virtual std::string mapHash ()
virtual bool isWalkable (int x, int y)
virtual int getGroundHeight (int x, int y)
virtual int getGroundHeight (TilePosition position)
virtual bool isBuildable (int x, int y, bool includeBuildings=false)
virtual bool isBuildable (TilePosition position, bool includeBuildings=false)
virtual bool isVisible (int x, int y)
virtual bool isVisible (TilePosition position)
virtual bool isExplored (int x, int y)
virtual bool isExplored (TilePosition position)
virtual bool hasCreep (int x, int y)
virtual bool hasCreep (TilePosition position)
virtual bool hasPower (int tileX, int tileY, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (TilePosition position, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType=UnitTypes::None) const
virtual bool hasPower (TilePosition position, int tileWidth, int tileHeight, UnitType unitType=UnitTypes::None) const
virtual bool hasPowerPrecise (int x, int y, UnitType unitType=UnitTypes::None) const
virtual bool hasPowerPrecise (Position position, UnitType unitType=UnitTypes::None) const
virtual bool canBuildHere (const Unit *builder, TilePosition position, UnitType type, bool checkExplored=false)
virtual bool canMake (const Unit *builder, UnitType type)
virtual bool canResearch (const Unit *unit, TechType type)
virtual bool canUpgrade (const Unit *unit, UpgradeType type)
virtual std::set< TilePosition > & getStartLocations ()
virtual void printf (const char *format,...)
virtual void sendText (const char *format,...)
virtual void sendTextEx (bool toAllies, const char *format,...)
virtual void changeRace (BWAPI::Race race)
virtual bool isInGame ()
virtual bool isMultiplayer ()
virtual bool isBattleNet ()
virtual bool isPaused ()
virtual bool isReplay ()
virtual void startGame ()
virtual void pauseGame ()
virtual void resumeGame ()
virtual void leaveGame ()
virtual void restartGame ()
virtual void setLocalSpeed (int speed=-1)
virtual bool issueCommand (const std::set< BWAPI::Unit * > &units, UnitCommand command)
virtual std::set< BWAPI::Unit * > & getSelectedUnits ()
virtual Playerself ()
virtual Playerenemy ()
virtual Playerneutral ()
virtual std::set
< BWAPI::Player * > & 
allies ()
virtual std::set
< BWAPI::Player * > & 
enemies ()
virtual std::set
< BWAPI::Player * > & 
observers ()
virtual void setTextSize (int size=1)
virtual void drawText (int ctype, int x, int y, const char *format,...)
virtual void drawTextMap (int x, int y, const char *format,...)
virtual void drawTextMouse (int x, int y, const char *format,...)
virtual void drawTextScreen (int x, int y, const char *format,...)
virtual void drawBox (int ctype, int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxMap (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxMouse (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawBoxScreen (int left, int top, int right, int bottom, Color color, bool isSolid=false)
virtual void drawTriangle (int ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleMap (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleMouse (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawTriangleScreen (int ax, int ay, int bx, int by, int cx, int cy, Color color, bool isSolid=false)
virtual void drawCircle (int ctype, int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleMap (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleMouse (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawCircleScreen (int x, int y, int radius, Color color, bool isSolid=false)
virtual void drawEllipse (int ctype, int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseMap (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseMouse (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawEllipseScreen (int x, int y, int xrad, int yrad, Color color, bool isSolid=false)
virtual void drawDot (int ctype, int x, int y, Color color)
virtual void drawDotMap (int x, int y, Color color)
virtual void drawDotMouse (int x, int y, Color color)
virtual void drawDotScreen (int x, int y, Color color)
virtual void drawLine (int ctype, int x1, int y1, int x2, int y2, Color color)
virtual void drawLineMap (int x1, int y1, int x2, int y2, Color color)
virtual void drawLineMouse (int x1, int y1, int x2, int y2, Color color)
virtual void drawLineScreen (int x1, int y1, int x2, int y2, Color color)
virtual void * getScreenBuffer ()
virtual int getLatencyFrames ()
virtual int getLatencyTime ()
virtual int getRemainingLatencyFrames ()
virtual int getRemainingLatencyTime ()
virtual int getRevision ()
virtual bool isDebug ()
virtual bool isLatComEnabled ()
virtual void setLatCom (bool isEnabled)
virtual bool isGUIEnabled ()
virtual void setGUI (bool enabled=true)
virtual int getInstanceNumber ()
virtual int getAPM (bool includeSelects=false)
virtual bool setMap (const char *mapFileName)
virtual void setFrameSkip (int frameSkip=1)
virtual bool hasPath (Position source, Position destination) const
virtual bool setAlliance (BWAPI::Player *player, bool allied=true, bool alliedVictory=true)
virtual bool setVision (BWAPI::Player *player, bool enabled=true)
virtual int elapsedTime () const
virtual void setCommandOptimizationLevel (int level=2)
virtual int countdownTimer () const
virtual const std::set
< BWAPI::Region * > & 
getAllRegions () const
virtual BWAPI::RegiongetRegionAt (int x, int y) const
virtual BWAPI::RegiongetRegionAt (BWAPI::Position position) const
virtual int getLastEventTime () const
virtual bool setReplayVision (BWAPI::Player *player, bool enabled=true)
virtual bool setRevealAll (bool reveal=true)

Static Public Member Functions

static void SendClientEvent (BWAPI::AIModule *module, Event &e)

Public Attributes

bool enabled
Race lastKnownRaceBeforeStart [8]
PlayerImplBWAPIPlayer
PlayerImplenemyPlayer
std::set< intinvalidIndices
std::list< std::string > sentMessages
std::list< Eventevents
int bulletCount
BW::dialogmyDlg
Server server
std::vector< BWAPI::UnitImpl * > lastEvadedUnits
bool onStartCalled
std::string lastMapGen
bool outOfGame
std::string autoMenuMode
std::string autoMenuMapPath
std::string autoMenuGameName
bool isHost
int autoMapTryCount
std::vector< std::string > autoMapPool
std::string autoMapIteration
std::string lastAutoMapString
unsigned int lastAutoMapEntry
int frameCount
BW::UnitsavedUnitSelection [12]
bool wantSelectionUpdate
bool startedClient
UnitImplunitArray [UNIT_ARRAY_MAX_LENGTH]
bool isTournamentCall
GameDatadata
int commandOptimizerLevel
HMODULE hAIModule
AIModuleclient
HMODULE hTournamentModule
AIModuletournamentAI
PlayerImplplayers [PLAYER_COUNT]
std::vector< PlayerImpl * > droppedPlayers

Detailed Description

The main class wrapping the whole game data/methods.


Constructor & Destructor Documentation

Here is the call graph for this function:


Member Function Documentation

void BWAPI::GameImpl::_changeRace ( int  slot,
BWAPI::Race  race 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

std::set< Player * > & BWAPI::GameImpl::allies ( ) [virtual]

Returns a set of all the ally players that have not left or been defeated. Does not include self.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<BWAPI::Player*>& BWAPI::GameImpl::allies ( ) [virtual]

Returns a set of all the ally players that have not left or been defeated. Does not include self.

Implements BWAPI::Game.

bool BWAPI::GameImpl::canBuildHere ( const Unit builder,
TilePosition  position,
UnitType  type,
bool  checkExplored = false 
) [virtual]

Returns true if the given unit type can be built at the given build tile position. Note the tile position specifies the top left tile of the building. If builder is not null, the unit will be discarded when determining whether or not any ground units are blocking the build location.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::canBuildHere ( const Unit builder,
TilePosition  position,
UnitType  type,
bool  checkExplored = false 
) [virtual]

Returns true if the given unit type can be built at the given build tile position. Note the tile position specifies the top left tile of the building. If builder is not null, the unit will be discarded when determining whether or not any ground units are blocking the build location.

Implements BWAPI::Game.

bool BWAPI::GameImpl::canMake ( const Unit builder,
UnitType  type 
) [virtual]

Returns true if the AI player has enough resources, supply, tech, and required units in order to make the given unit type. If builder is not null, canMake will return true only if the builder unit can build the given unit type.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::canMake ( const Unit builder,
UnitType  type 
) [virtual]

Returns true if the AI player has enough resources, supply, tech, and required units in order to make the given unit type. If builder is not null, canMake will return true only if the builder unit can build the given unit type.

Implements BWAPI::Game.

bool BWAPI::GameImpl::canResearch ( const Unit unit,
TechType  type 
) [virtual]

Returns true if the AI player has enough resources required to research the given tech type. If unit is not null, canResearch will return true only if the given unit can research the given tech type.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::canResearch ( const Unit unit,
TechType  type 
) [virtual]

Returns true if the AI player has enough resources required to research the given tech type. If unit is not null, canResearch will return true only if the given unit can research the given tech type.

Implements BWAPI::Game.

bool BWAPI::GameImpl::canUpgrade ( const Unit unit,
UpgradeType  type 
) [virtual]

Returns true if the AI player has enough resources required to upgrade the given upgrade type. If unit is not null, canUpgrade will return true only if the given unit can upgrade the given upgrade type.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::canUpgrade ( const Unit unit,
UpgradeType  type 
) [virtual]

Returns true if the AI player has enough resources required to upgrade the given upgrade type. If unit is not null, canUpgrade will return true only if the given unit can upgrade the given upgrade type.

Implements BWAPI::Game.

void BWAPI::GameImpl::changeRace ( BWAPI::Race  race) [virtual]

Changes race in the pre-game lobby.

Parameters:
raceDesired race of the slot (Zerg/Protoss/Terran/Random)

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::changeRace ( BWAPI::Race  race) [virtual]

Used to change the race while in a lobby. Note that there is no onLobbyEnter callback yet, so this function cannot be used at this time.

Implements BWAPI::Game.

Changes slot state in the pre-game lobby.

Parameters:
slotDesired state of the slot (Open/Closed/Computer)
slotIDOrder of the slot (0 based)

Here is the caller graph for this function:

Here is the call graph for this function:

int BWAPI::GameImpl::countdownTimer ( ) const [virtual]

Returns the remaining countdown time in seconds.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::countdownTimer ( ) const [virtual]

Returns the remaining countdown time in seconds.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawBox ( int  ctype,
int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a box on the screen, with the given color. If isSolid is true, the entire box will be rendered, otherwise just the outline will be drawn.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawBox ( int  ctype,
int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a box on the screen, with the given color. If isSolid is true, the entire box will be rendered, otherwise just the outline will be drawn.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawBoxMap ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::drawBoxMap ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawBoxMouse ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawBoxMouse ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawBoxScreen ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawBoxScreen ( int  left,
int  top,
int  right,
int  bottom,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawCircle ( int  ctype,
int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a circle on the screen, with the given color. If isSolid is true, a solid circle is drawn, otherwise just the outline of a circle will be drawn.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawCircle ( int  ctype,
int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a circle on the screen, with the given color. If isSolid is true, a solid circle is drawn, otherwise just the outline of a circle will be drawn.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawCircleMap ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawCircleMap ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawCircleMouse ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawCircleMouse ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawCircleScreen ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawCircleScreen ( int  x,
int  y,
int  radius,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawDot ( int  ctype,
int  x,
int  y,
Color  color 
) [virtual]

Draws a dot on the screen at the given position with the given color.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawDot ( int  ctype,
int  x,
int  y,
Color  color 
) [virtual]

Draws a dot on the screen at the given position with the given color.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawDotMap ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawDotMap ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawDotMouse ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawDotMouse ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawDotScreen ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawDotScreen ( int  x,
int  y,
Color  color 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawEllipse ( int  ctype,
int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Draws an ellipse on the screen, with the given color. If isSolid is true, a solid ellipse is drawn, otherwise just the outline of an ellipse will be drawn.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawEllipse ( int  ctype,
int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Draws an ellipse on the screen, with the given color. If isSolid is true, a solid ellipse is drawn, otherwise just the outline of an ellipse will be drawn.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawEllipseMap ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawEllipseMap ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawEllipseMouse ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawEllipseMouse ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawEllipseScreen ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawEllipseScreen ( int  x,
int  y,
int  xrad,
int  yrad,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawLine ( int  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Draws a line on the screen from (x1,y1) to (x2,y2) with the given color.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawLine ( int  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Draws a line on the screen from (x1,y1) to (x2,y2) with the given color.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawLineMap ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::drawLineMap ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawLineMouse ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawLineMouse ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawLineScreen ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawLineScreen ( int  x1,
int  y1,
int  x2,
int  y2,
Color  color 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::drawText ( int  ctype,
int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Draws text on the screen at the given position. Text can be drawn in different colors by using the following control characters: TODO: add image from wiki.

Implements BWAPI::Game.

virtual void BWAPI::GameImpl::drawText ( int  ctype,
int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Draws text on the screen at the given position. Text can be drawn in different colors by using the following control characters: TODO: add image from wiki.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTextMap ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::drawTextMap ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTextMouse ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::drawTextMouse ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTextScreen ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::drawTextScreen ( int  x,
int  y,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTriangle ( int  ctype,
int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a triangle on the screen. If isSolid is true, a solid triangle is drawn, otherwise just the outline of the triangle will be drawn.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawTriangle ( int  ctype,
int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Draws a triangle on the screen. If isSolid is true, a solid triangle is drawn, otherwise just the outline of the triangle will be drawn.

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTriangleMap ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawTriangleMap ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTriangleMouse ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawTriangleMouse ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

void BWAPI::GameImpl::drawTriangleScreen ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::drawTriangleScreen ( int  ax,
int  ay,
int  bx,
int  by,
int  cx,
int  cy,
Color  color,
bool  isSolid = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

int BWAPI::GameImpl::elapsedTime ( ) const [virtual]

Returns the elapsed game time in seconds.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::elapsedTime ( ) const [virtual]

Returns the elapsed game time in seconds.

Implements BWAPI::Game.

void BWAPI::GameImpl::enableFlag ( int  flag) [virtual]

Enables the specified flag. Note that flags can only be enabled at the beginning of a match, during the AIModule::onStart callback.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::enableFlag ( int  flag) [virtual]

Enables the specified flag. Note that flags can only be enabled at the beginning of a match, during the AIModule::onStart callback.

Implements BWAPI::Game.

std::set< Player * > & BWAPI::GameImpl::enemies ( ) [virtual]

Returns a set of all the enemy players that have not left or been defeated.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<BWAPI::Player*>& BWAPI::GameImpl::enemies ( ) [virtual]

Returns a set of all the enemy players that have not left or been defeated.

Implements BWAPI::Game.

Player * BWAPI::GameImpl::enemy ( ) [virtual]

Returns a pointer to the enemy player. If there is more than one enemy, this returns a pointer to just one enemy (see enemies to get all enemies still in game). In replays this will return NULL.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual Player* BWAPI::GameImpl::enemy ( ) [virtual]

Returns a pointer to the enemy player. If there is more than one enemy, this returns a pointer to just one enemy (see enemies to get all enemies still in game). In replays this will return NULL.

Implements BWAPI::Game.

void BWAPI::GameImpl::executeCommand ( UnitCommand  command,
bool  addCommandToLatComBuffer = true 
)

Here is the call graph for this function:

Here is the caller graph for this function:

const std::set< BWAPI::Region * > & BWAPI::GameImpl::getAllRegions ( ) const [virtual]

Returns the set of all map regions.

Implements BWAPI::Game.

virtual const std::set<BWAPI::Region*>& BWAPI::GameImpl::getAllRegions ( ) const [virtual]

Returns the set of all map regions.

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getAllUnits ( ) [virtual]

Returns all the visible units. If Flag::CompleteMapInformation is enabled, the set of all units is returned, not just visible ones. Note that units inside refineries are not included in this set yet.

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getAllUnits ( ) [virtual]

Returns all the visible units. If Flag::CompleteMapInformation is enabled, the set of all units is returned, not just visible ones. Note that units inside refineries are not included in this set yet.

Implements BWAPI::Game.

int BWAPI::GameImpl::getAPM ( bool  includeSelects = false) [virtual]

Retrieves the bot's APM. Can include or exclude select commands.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getAPM ( bool  includeSelects = false) [virtual]

Retrieves the bot's APM. Can include or exclude select commands.

Implements BWAPI::Game.

double BWAPI::GameImpl::getAverageFPS ( ) [virtual]

Implements BWAPI::Game.

virtual double BWAPI::GameImpl::getAverageFPS ( ) [virtual]

Implements BWAPI::Game.

Here is the caller graph for this function:

std::set< Bullet * > & BWAPI::GameImpl::getBullets ( ) [virtual]

Returns all visible bullets. If Flag::CompleteMapInformation is enabled, the set of all bullets is returned, not just visible ones.

Implements BWAPI::Game.

virtual std::set< Bullet* >& BWAPI::GameImpl::getBullets ( ) [virtual]

Returns all visible bullets. If Flag::CompleteMapInformation is enabled, the set of all bullets is returned, not just visible ones.

Implements BWAPI::Game.

std::list< Event > & BWAPI::GameImpl::getEvents ( ) [virtual]

Returns the list of events

Implements BWAPI::Game.

virtual std::list< Event>& BWAPI::GameImpl::getEvents ( ) [virtual]

Returns the list of events

Implements BWAPI::Game.

Force * BWAPI::GameImpl::getForce ( int  forceID) [virtual]

Returns the force with the given ID, or NULL if no force has the given ID

Implements BWAPI::Game.

Here is the call graph for this function:

virtual Force* BWAPI::GameImpl::getForce ( int  forceID) [virtual]

Returns the force with the given ID, or NULL if no force has the given ID

Implements BWAPI::Game.

std::set< Force * > & BWAPI::GameImpl::getForces ( ) [virtual]

Returns the set of all forces in the match.

Implements BWAPI::Game.

virtual std::set< Force* >& BWAPI::GameImpl::getForces ( ) [virtual]

Returns the set of all forces in the match.

Implements BWAPI::Game.

Returns the Frames Per Second (FPS) that the game is currently running at

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getFPS ( ) [virtual]

Returns the Frames Per Second (FPS) that the game is currently running at

Implements BWAPI::Game.

Returns the number of logical frames since the match started. If the game is paused, Game::getFrameCount will not increase however AIModule::onFrame will still be called while paused. On Fastest, there are about 23.8 - 24 frames per second.

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::getFrameCount ( ) [virtual]

Returns the number of logical frames since the match started. If the game is paused, Game::getFrameCount will not increase however AIModule::onFrame will still be called while paused. On Fastest, there are about 23.8 - 24 frames per second.

Implements BWAPI::Game.

Returns the game type

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual GameType BWAPI::GameImpl::getGameType ( ) [virtual]

Returns the game type

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getGeysers ( ) [virtual]

Returns the set of all accessible vespene geysers.

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getGeysers ( ) [virtual]

Returns the set of all accessible vespene geysers.

Implements BWAPI::Game.

int BWAPI::GameImpl::getGroundHeight ( int  tileX,
int  tileY 
) [virtual]

Returns the ground height of the given build tile. 0 = normal, 1 = high ground. 2 = very high ground.

Implements BWAPI::Game.

Here is the call graph for this function:

Returns the ground height of the given build tile. 0 = normal, 1 = high ground. 2 = very high ground.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual int BWAPI::GameImpl::getGroundHeight ( int  tileX,
int  tileY 
) [virtual]

Returns the ground height of the given build tile. 0 = normal, 1 = high ground. 2 = very high ground.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getGroundHeight ( TilePosition  position) [virtual]

Returns the ground height of the given build tile. 0 = normal, 1 = high ground. 2 = very high ground.

Implements BWAPI::Game.

Retrieves the instance number recorded by BWAPI to identify which instance an AI module belongs to

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getInstanceNumber ( ) [virtual]

Retrieves the instance number recorded by BWAPI to identify which instance an AI module belongs to

Implements BWAPI::Game.

bool BWAPI::GameImpl::getKeyState ( Key  key) [virtual]

Returns true if the specified key is pressed. Returns false if Flag::UserInput is disabled. Unfortunately this does not read the raw keyboard input yet - when you hold down a key, the getKeyState function is true for a frame, then false for a few frames, and then alternates between true and false (as if you were holding down the key in a text box). Hopefully this will be fixed in a later version.

Implements BWAPI::Game.

bool BWAPI::GameImpl::getKeyState ( int  key) [virtual]

Returns true if the specified key is pressed. Returns false if Flag::UserInput is disabled. Unfortunately this does not read the raw keyboard input yet - when you hold down a key, the getKeyState function is true for a frame, then false for a few frames, and then alternates between true and false (as if you were holding down the key in a text box). Hopefully this will be fixed in a later version.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::getKeyState ( Key  key) [virtual]

Returns true if the specified key is pressed. Returns false if Flag::UserInput is disabled. Unfortunately this does not read the raw keyboard input yet - when you hold down a key, the getKeyState function is true for a frame, then false for a few frames, and then alternates between true and false (as if you were holding down the key in a text box). Hopefully this will be fixed in a later version.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::getKeyState ( int  key) [virtual]

Returns true if the specified key is pressed. Returns false if Flag::UserInput is disabled. Unfortunately this does not read the raw keyboard input yet - when you hold down a key, the getKeyState function is true for a frame, then false for a few frames, and then alternates between true and false (as if you were holding down the key in a text box). Hopefully this will be fixed in a later version.

Implements BWAPI::Game.

Error BWAPI::GameImpl::getLastError ( ) const [virtual]

Returns the last error that was set. If you try to order enemy units around, or morph bunkers into lurkers, BWAPI will set error codes, which can be retrieved using this function.

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual Error BWAPI::GameImpl::getLastError ( ) const [virtual]

Returns the last error that was set. If you try to order enemy units around, or morph bunkers into lurkers, BWAPI will set error codes, which can be retrieved using this function.

Implements BWAPI::Game.

Returns the time taken to perform the previous event call. Used for tournament management.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getLastEventTime ( ) const [virtual]

Returns the time taken to perform the previous event call. Used for tournament management.

Implements BWAPI::Game.

Returns the amount of latency the current game has. Currently only returns Latency::SinglePlayer, Latency::LanLow, Latency::LanMedium, or Latency::LanHigh.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::getLatency ( ) [virtual]

Returns the amount of latency the current game has. Currently only returns Latency::SinglePlayer, Latency::LanLow, Latency::LanMedium, or Latency::LanHigh.

Implements BWAPI::Game.

Retrieves latency values for the game. Includes latency, speed, and mode

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::getLatencyFrames ( ) [virtual]

Retrieves latency values for the game. Includes latency, speed, and mode

Implements BWAPI::Game.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::getLatencyTime ( ) [virtual]

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getMinerals ( ) [virtual]

Returns the set of all accessible mineral patches.

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getMinerals ( ) [virtual]

Returns the set of all accessible mineral patches.

Implements BWAPI::Game.

Returns the position of the mouse on the screen. Returns Positions::Unknown if Flag::UserInput is disabled.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the position of the mouse on the screen. Returns Positions::Unknown if Flag::UserInput is disabled.

Implements BWAPI::Game.

bool BWAPI::GameImpl::getMouseState ( MouseButton  button) [virtual]

Returns true if the specified mouse button is pressed. Returns false if Flag::UserInput is disabled.

Implements BWAPI::Game.

bool BWAPI::GameImpl::getMouseState ( int  button) [virtual]

Returns true if the specified mouse button is pressed. Returns false if Flag::UserInput is disabled.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::getMouseState ( MouseButton  button) [virtual]

Returns true if the specified mouse button is pressed. Returns false if Flag::UserInput is disabled.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::getMouseState ( int  button) [virtual]

Returns true if the specified mouse button is pressed. Returns false if Flag::UserInput is disabled.

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getNeutralUnits ( ) [virtual]

Returns the set of all accessible neutral units.

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getNeutralUnits ( ) [virtual]

Returns the set of all accessible neutral units.

Implements BWAPI::Game.

std::set< Position > & BWAPI::GameImpl::getNukeDots ( ) [virtual]

Returns all visible nuke dots. If Flag::CompleteMapInformation is enabled, the set of all nuke dots is returned, not just visible ones.

Implements BWAPI::Game.

virtual std::set< Position >& BWAPI::GameImpl::getNukeDots ( ) [virtual]

Returns all visible nuke dots. If Flag::CompleteMapInformation is enabled, the set of all nuke dots is returned, not just visible ones.

Implements BWAPI::Game.

Player * BWAPI::GameImpl::getPlayer ( int  playerID) [virtual]

Returns the player with the given ID, or NULL if no player has the given ID

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Player* BWAPI::GameImpl::getPlayer ( int  playerID) [virtual]

Returns the player with the given ID, or NULL if no player has the given ID

Implements BWAPI::Game.

std::set< Player * > & BWAPI::GameImpl::getPlayers ( ) [virtual]

Returns the set of all players in the match. Note that this includes the Neutral player, which owns all the neutral units such as minerals, critters, etc.

Implements BWAPI::Game.

virtual std::set< Player* >& BWAPI::GameImpl::getPlayers ( ) [virtual]

Returns the set of all players in the match. Note that this includes the Neutral player, which owns all the neutral units such as minerals, critters, etc.

Implements BWAPI::Game.

Region * BWAPI::GameImpl::getRegion ( int  regionID) [virtual]

Returns the Region with the given ID, or NULL if no region has the given ID

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual Region* BWAPI::GameImpl::getRegion ( int  regionID) [virtual]

Returns the Region with the given ID, or NULL if no region has the given ID

Implements BWAPI::Game.

BWAPI::Region * BWAPI::GameImpl::getRegionAt ( int  x,
int  y 
) const [virtual]

Returns the region at a position.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Implements BWAPI::Game.

Here is the call graph for this function:

virtual BWAPI::Region* BWAPI::GameImpl::getRegionAt ( int  x,
int  y 
) const [virtual]

Returns the region at a position.

Implements BWAPI::Game.

virtual BWAPI::Region* BWAPI::GameImpl::getRegionAt ( BWAPI::Position  position) const [virtual]

Implements BWAPI::Game.

Implements BWAPI::Game.

Here is the call graph for this function:

Implements BWAPI::Game.

Implements BWAPI::Game.

Here is the call graph for this function:

Implements BWAPI::Game.

Retrieves the number of frames in the replay

Implements BWAPI::Game.

Retrieves the number of frames in the replay

Implements BWAPI::Game.

Retrieves the current revision of BWAPI.

Implements BWAPI::Game.

virtual int BWAPI::GameImpl::getRevision ( ) [virtual]

Retrieves the current revision of BWAPI.

Implements BWAPI::Game.

void * BWAPI::GameImpl::getScreenBuffer ( ) [virtual]

Retrieves the screen buffer for the game (excluding the HUD)

Implements BWAPI::Game.

virtual void* BWAPI::GameImpl::getScreenBuffer ( ) [virtual]

Retrieves the screen buffer for the game (excluding the HUD)

Implements BWAPI::Game.

Returns the position of the top left corner of the screen on the map. Returns Positions::Unknown if Flag::UserInput is disabled.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the position of the top left corner of the screen on the map. Returns Positions::Unknown if Flag::UserInput is disabled.

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getSelectedUnits ( ) [virtual]

Returns the set of units currently selected by the user in the GUI. If Flag?::UserInput? was not enabled during the AIModule::onStart callback, this function will always return an empty set.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<BWAPI::Unit*>& BWAPI::GameImpl::getSelectedUnits ( ) [virtual]

Returns the set of units currently selected by the user in the GUI. If Flag?::UserInput? was not enabled during the AIModule::onStart callback, this function will always return an empty set.

Implements BWAPI::Game.

std::set< TilePosition > & BWAPI::GameImpl::getStartLocations ( ) [virtual]

Returns the set of starting locations for the given map. To determine the starting location for the players in the current match, see Player::getStartLocation.

Implements BWAPI::Game.

virtual std::set< TilePosition >& BWAPI::GameImpl::getStartLocations ( ) [virtual]

Returns the set of starting locations for the given map. To determine the starting location for the players in the current match, see Player::getStartLocation.

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getStaticGeysers ( ) [virtual]

Returns the set of all vespene geysers (including mined out and other inaccessible ones).

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getStaticGeysers ( ) [virtual]

Returns the set of all vespene geysers (including mined out and other inaccessible ones).

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getStaticMinerals ( ) [virtual]

Returns the set of all mineral patches (including mined out and other inaccessible ones).

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getStaticMinerals ( ) [virtual]

Returns the set of all mineral patches (including mined out and other inaccessible ones).

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getStaticNeutralUnits ( ) [virtual]

Returns the set of all neutral units (including mined out and other inaccessible ones).

Implements BWAPI::Game.

virtual std::set< Unit* >& BWAPI::GameImpl::getStaticNeutralUnits ( ) [virtual]

Returns the set of all neutral units (including mined out and other inaccessible ones).

Implements BWAPI::Game.

Unit * BWAPI::GameImpl::getUnit ( int  unitID) [virtual]

Returns the unit with the given ID, or NULL if no unit has the given ID

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Unit* BWAPI::GameImpl::getUnit ( int  unitID) [virtual]

Returns the unit with the given ID, or NULL if no unit has the given ID

Implements BWAPI::Game.

Here is the caller graph for this function:

std::set< Unit * > & BWAPI::GameImpl::getUnitsInRadius ( BWAPI::Position  center,
int  radius 
) const [virtual]

Returns the set of accessible units within or overlapping a circle at the given point with the given radius.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<Unit*>& BWAPI::GameImpl::getUnitsInRadius ( BWAPI::Position  center,
int  radius 
) const [virtual]

Returns the set of accessible units within or overlapping a circle at the given point with the given radius.

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getUnitsInRectangle ( int  left,
int  top,
int  right,
int  bottom 
) const [virtual]

Returns the set of accessible units that are in or overlapping the given rectangle.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

std::set< Unit * > & BWAPI::GameImpl::getUnitsInRectangle ( BWAPI::Position  topLeft,
BWAPI::Position  bottomRight 
) const [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<Unit*>& BWAPI::GameImpl::getUnitsInRectangle ( int  left,
int  top,
int  right,
int  bottom 
) const [virtual]

Returns the set of accessible units that are in or overlapping the given rectangle.

Implements BWAPI::Game.

virtual std::set<Unit*>& BWAPI::GameImpl::getUnitsInRectangle ( BWAPI::Position  topLeft,
BWAPI::Position  bottomRight 
) const [virtual]

Implements BWAPI::Game.

std::set< Unit * > & BWAPI::GameImpl::getUnitsOnTile ( int  tileX,
int  tileY 
) [virtual]

Returns the set of accessible units that are on the given build tile.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<Unit*>& BWAPI::GameImpl::getUnitsOnTile ( int  tileX,
int  tileY 
) [virtual]

Returns the set of accessible units that are on the given build tile.

Implements BWAPI::Game.

bool BWAPI::GameImpl::hasCreep ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile has zerg creep on it. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::hasCreep ( TilePosition  position) [virtual]

Returns true if the specified build tile has zerg creep on it. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::hasCreep ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile has zerg creep on it. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::hasCreep ( TilePosition  position) [virtual]

Returns true if the specified build tile has zerg creep on it. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

bool BWAPI::GameImpl::hasPath ( Position  source,
Position  destination 
) const [virtual]

Returns true if Starcraft can find a path from the source to the destination.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::hasPath ( Position  source,
Position  destination 
) const [virtual]

Returns true if Starcraft can find a path from the source to the destination.

Implements BWAPI::Game.

bool BWAPI::GameImpl::hasPower ( int  tileX,
int  tileY,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::hasPower ( TilePosition  position,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the call graph for this function:

bool BWAPI::GameImpl::hasPower ( int  tileX,
int  tileY,
int  tileWidth,
int  tileHeight,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the call graph for this function:

bool BWAPI::GameImpl::hasPower ( TilePosition  position,
int  tileWidth,
int  tileHeight,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::hasPower ( int  tileX,
int  tileY,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::hasPower ( TilePosition  position,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::hasPower ( int  tileX,
int  tileY,
int  tileWidth,
int  tileHeight,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::hasPower ( TilePosition  position,
int  tileWidth,
int  tileHeight,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given build location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

bool BWAPI::GameImpl::hasPowerPrecise ( int  x,
int  y,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given pixel location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the caller graph for this function:

bool BWAPI::GameImpl::hasPowerPrecise ( Position  position,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given pixel location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::hasPowerPrecise ( int  x,
int  y,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given pixel location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::hasPowerPrecise ( Position  position,
UnitType  unitType = UnitTypes::None 
) const [virtual]

Returns true if the given pixel location is powered by a nearby friendly pylon.

Implements BWAPI::Game.

Unit * BWAPI::GameImpl::indexToUnit ( int  unitIndex) [virtual]

Returns a pointer to a Unit given an index.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual Unit* BWAPI::GameImpl::indexToUnit ( int  unitIndex) [virtual]

Returns a pointer to a Unit given an index.

Implements BWAPI::Game.

bool BWAPI::GameImpl::inScreen ( int  ctype,
int  x,
int  y 
)

Here is the caller graph for this function:

bool BWAPI::GameImpl::inScreen ( int  ctype,
int  x1,
int  y1,
int  x2,
int  y2 
)

Here is the call graph for this function:

bool BWAPI::GameImpl::inScreen ( int  ctype,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

Here is the call graph for this function:

bool BWAPI::GameImpl::isBattleNet ( ) [virtual]

Returns true if Broodwar is in a BNet multiplayer game.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isBattleNet ( ) [virtual]

Returns true if Broodwar is in a BNet multiplayer game.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isBuildable ( int  tileX,
int  tileY,
bool  includeBuildings = false 
) [virtual]

Returns true if the specified build tile is buildable. Note that this just uses the static map data. You will also need to make sure no ground units on the tile to see if its currently buildable. To do this, see unitsOnTile.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::isBuildable ( TilePosition  position,
bool  includeBuildings = false 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isBuildable ( int  tileX,
int  tileY,
bool  includeBuildings = false 
) [virtual]

Returns true if the specified build tile is buildable. Note that this just uses the static map data. You will also need to make sure no ground units on the tile to see if its currently buildable. To do this, see unitsOnTile.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::isBuildable ( TilePosition  position,
bool  includeBuildings = false 
) [virtual]

Implements BWAPI::Game.

bool BWAPI::GameImpl::isDebug ( ) [virtual]

Retrieves the debug state of the BWAPI build.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::isDebug ( ) [virtual]

Retrieves the debug state of the BWAPI build.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isExplored ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile has been explored (i.e. was visible at some point in the match).

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::isExplored ( TilePosition  position) [virtual]

Returns true if the specified build tile has been explored (i.e. was visible at some point in the match).

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isExplored ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile has been explored (i.e. was visible at some point in the match).

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::isExplored ( TilePosition  position) [virtual]

Returns true if the specified build tile has been explored (i.e. was visible at some point in the match).

Implements BWAPI::Game.

bool BWAPI::GameImpl::isFlagEnabled ( int  flag) [virtual]

Returns true if the given flag has been enabled. Note that flags can only be enabled at the beginning of a match, during the AIModule::onStart callback.

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::isFlagEnabled ( int  flag) [virtual]

Returns true if the given flag has been enabled. Note that flags can only be enabled at the beginning of a match, during the AIModule::onStart callback.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isGUIEnabled ( ) [virtual]
virtual bool BWAPI::GameImpl::isGUIEnabled ( ) [virtual]
bool BWAPI::GameImpl::isInGame ( ) [virtual]

Returns true if Broodwar is in a game. Returns false for lobby and menu screens

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isInGame ( ) [virtual]

Returns true if Broodwar is in a game. Returns false for lobby and menu screens

Implements BWAPI::Game.

Returns true if latency compensation is enabled

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::isLatComEnabled ( ) [virtual]

Returns true if latency compensation is enabled

Implements BWAPI::Game.

bool BWAPI::GameImpl::isMultiplayer ( ) [virtual]

Returns true if Broodwar is in a multiplayer game. Returns false for single player games and replays.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::isMultiplayer ( ) [virtual]

Returns true if Broodwar is in a multiplayer game. Returns false for single player games and replays.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isPaused ( ) [virtual]

Returns true if Broodwar is paused. If the game is paused, Game::getFrameCount will continue to increase and AIModule::onFrame will still be called while paused.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::isPaused ( ) [virtual]

Returns true if Broodwar is paused. If the game is paused, Game::getFrameCount will continue to increase and AIModule::onFrame will still be called while paused.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isReplay ( ) [virtual]

Returns true if Broodwar is in a replay.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::isReplay ( ) [virtual]

Returns true if Broodwar is in a replay.

Implements BWAPI::Game.

bool BWAPI::GameImpl::issueCommand ( const std::set< BWAPI::Unit * > &  units,
UnitCommand  command 
) [virtual]

Issues a command to a group of units

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::issueCommand ( const std::set< BWAPI::Unit * > &  units,
UnitCommand  command 
) [virtual]

Issues a command to a group of units

Implements BWAPI::Game.

bool BWAPI::GameImpl::isVisible ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile is visible. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::isVisible ( TilePosition  position) [virtual]

Returns true if the specified build tile is visible. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isVisible ( int  tileX,
int  tileY 
) [virtual]

Returns true if the specified build tile is visible. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

virtual bool BWAPI::GameImpl::isVisible ( TilePosition  position) [virtual]

Returns true if the specified build tile is visible. If the tile is concealed by fog of war, the function will return false.

Implements BWAPI::Game.

bool BWAPI::GameImpl::isWalkable ( int  walkX,
int  walkY 
) [virtual]

Returns true if the specified walk tile is walkable. The values of x and y are in walk tile coordinates (different from build tile coordinates). Note that this just uses the static map data. You will also need to make sure no ground units are on the coresponding build tile to see if its currently walkable. To do this, see unitsOnTile.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::isWalkable ( int  walkX,
int  walkY 
) [virtual]

Returns true if the specified walk tile is walkable. The values of x and y are in walk tile coordinates (different from build tile coordinates). Note that this just uses the static map data. You will also need to make sure no ground units are on the coresponding build tile to see if its currently walkable. To do this, see unitsOnTile.

Implements BWAPI::Game.

void BWAPI::GameImpl::leaveGame ( ) [virtual]

Leaves the current match and goes to the after-game stats screen.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::leaveGame ( ) [virtual]

Leaves the current match and goes to the after-game stats screen.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

std::string BWAPI::GameImpl::mapFileName ( ) [virtual]

Returns the file name of the current map.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::string BWAPI::GameImpl::mapFileName ( ) [virtual]

Returns the file name of the current map.

Implements BWAPI::Game.

std::string BWAPI::GameImpl::mapHash ( ) [virtual]

Returns the SHA-1 hash of the map file.

Implements BWAPI::Game.

virtual std::string BWAPI::GameImpl::mapHash ( ) [virtual]

Returns the SHA-1 hash of the map file.

Implements BWAPI::Game.

Returns the height of the current map, in build tile units. To get the height of the current map in walk tile units, multiply by 4. To get the height of the current map in Position units, multiply by TILE_SIZE (which is 32).

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::mapHeight ( ) [virtual]

Returns the height of the current map, in build tile units. To get the height of the current map in walk tile units, multiply by 4. To get the height of the current map in Position units, multiply by TILE_SIZE (which is 32).

Implements BWAPI::Game.

std::string BWAPI::GameImpl::mapName ( ) [virtual]

Returns the name/title of the current map.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string BWAPI::GameImpl::mapName ( ) [virtual]

Returns the name/title of the current map.

Implements BWAPI::Game.

std::string BWAPI::GameImpl::mapPathName ( ) [virtual]

Returns the full path name of the current map.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::string BWAPI::GameImpl::mapPathName ( ) [virtual]

Returns the full path name of the current map.

Implements BWAPI::Game.

Returns the width of the current map, in build tile units. To get the width of the current map in walk tile units, multiply by 4. To get the width of the current map in Position units, multiply by TILE_SIZE (which is 32).

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int BWAPI::GameImpl::mapWidth ( ) [virtual]

Returns the width of the current map, in build tile units. To get the width of the current map in walk tile units, multiply by 4. To get the width of the current map in Position units, multiply by TILE_SIZE (which is 32).

Implements BWAPI::Game.

void BWAPI::GameImpl::mouseDown ( int  x,
int  y 
)

Here is the call graph for this function:

void BWAPI::GameImpl::mouseUp ( int  x,
int  y 
)

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Returns a pointer to the neutral player.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual Player* BWAPI::GameImpl::neutral ( ) [virtual]

Returns a pointer to the neutral player.

Implements BWAPI::Game.

std::set< Player * > & BWAPI::GameImpl::observers ( ) [virtual]

Returns a set of all the observer players that have not left.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual std::set<BWAPI::Player*>& BWAPI::GameImpl::observers ( ) [virtual]

Returns a set of all the observer players that have not left.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

This function is called at the start of every match

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::onReceiveText ( int  playerId,
std::string  text 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::onSaveGame ( char *  name)

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::onSendText ( const char *  text)

Here is the call graph for this function:

Here is the caller graph for this function:

bool BWAPI::GameImpl::parseText ( const char *  text)

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::pauseGame ( ) [virtual]

Pauses the game. If the game is paused, Game::getFrameCount will not increase however AIModule::onFrame will still be called while paused.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::pauseGame ( ) [virtual]

Pauses the game. If the game is paused, Game::getFrameCount will not increase however AIModule::onFrame will still be called while paused.

Implements BWAPI::Game.

void BWAPI::GameImpl::pingMinimap ( int  x,
int  y 
) [virtual]

Pings the given position on the minimap.

Implements BWAPI::Game.

Here is the call graph for this function:

Pings the given position on the minimap.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::pingMinimap ( int  x,
int  y 
) [virtual]

Pings the given position on the minimap.

Implements BWAPI::Game.

virtual void BWAPI::GameImpl::pingMinimap ( BWAPI::Position  p) [virtual]

Pings the given position on the minimap.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::printf ( const char *  format,
  ... 
) [virtual]

Prints text in game (only local)

Parameters:
formatText to be written

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::printf ( const char *  format,
  ... 
) [virtual]

Prints text on the screen. Text is not sent to other players in multiplayer games.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::restartGame ( ) [virtual]

Restarts the match. Works the same way as if you restarted the match from the menu screen. Only available in single player mode.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::restartGame ( ) [virtual]

Restarts the match. Works the same way as if you restarted the match from the menu screen. Only available in single player mode.

Implements BWAPI::Game.

void BWAPI::GameImpl::resumeGame ( ) [virtual]

Resumes the game.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::resumeGame ( ) [virtual]

Resumes the game.

Implements BWAPI::Game.

Player * BWAPI::GameImpl::self ( ) [virtual]

Returns a pointer to the player that BWAPI controls. In replays this will return null.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Player* BWAPI::GameImpl::self ( ) [virtual]

Returns a pointer to the player that BWAPI controls. In replays this will return null.

Implements BWAPI::Game.

void BWAPI::GameImpl::SendClientEvent ( BWAPI::AIModule module,
Event e 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

void BWAPI::GameImpl::sendText ( const char *  format,
  ... 
) [virtual]

Sends text to other players - as if it were entered in chat. In single player games and replays, this will just print the text on the screen. If the game is a single player match and not a replay, then this function can be used to execute cheat codes, i.e. Broodwar->sendText("show me the money").

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::sendText ( const char *  format,
  ... 
) [virtual]

Sends text to other players - as if it were entered in chat. In single player games and replays, this will just print the text on the screen. If the game is a single player match and not a replay, then this function can be used to execute cheat codes, i.e. Broodwar->sendText("show me the money").

Implements BWAPI::Game.

void BWAPI::GameImpl::sendTextEx ( bool  toAllies,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::sendTextEx ( bool  toAllies,
const char *  format,
  ... 
) [virtual]

Implements BWAPI::Game.

bool BWAPI::GameImpl::setAlliance ( BWAPI::Player player,
bool  allied = true,
bool  alliedVictory = true 
) [virtual]

Sets the BWAPI player's alliance with another player.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::setAlliance ( BWAPI::Player player,
bool  allied = true,
bool  alliedVictory = true 
) [virtual]

Sets the BWAPI player's alliance with another player.

Implements BWAPI::Game.

void BWAPI::GameImpl::setCommandOptimizationLevel ( int  level = 2) [virtual]

Sets the level of command optimizations. 0 = No optimization. 1 = Some optimization (Stop, Hold Position, Siege, Burrow, etc.). 2 = More optimization (Train, Set Rally, Lift, [multi-select buildings]). 3 = Maximum optimization (Attack/Move to position, use ability at position, etc.).

Implements BWAPI::Game.

virtual void BWAPI::GameImpl::setCommandOptimizationLevel ( int  level = 2) [virtual]

Sets the level of command optimizations. 0 = No optimization. 1 = Some optimization (Stop, Hold Position, Siege, Burrow, etc.). 2 = More optimization (Train, Set Rally, Lift, [multi-select buildings]). 3 = Maximum optimization (Attack/Move to position, use ability at position, etc.).

Implements BWAPI::Game.

void BWAPI::GameImpl::setFrameSkip ( int  frameSkip = 1) [virtual]

Sets the frame skip value. 1 = normal

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::setFrameSkip ( int  frameSkip = 1) [virtual]

Sets the frame skip value. 1 = normal

Implements BWAPI::Game.

void BWAPI::GameImpl::setGUI ( bool  enabled = true) [virtual]

Sets the rendering state of the Starcraft GUI

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::setGUI ( bool  enabled = true) [virtual]

Sets the rendering state of the Starcraft GUI

Implements BWAPI::Game.

Sets the last error code.

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::setLastError ( BWAPI::Error  e) [virtual]

Sets the last error code.

Implements BWAPI::Game.

void BWAPI::GameImpl::setLatCom ( bool  isEnabled) [virtual]

Use to enable or disable latency compensation. Default: Enabled

Implements BWAPI::Game.

virtual void BWAPI::GameImpl::setLatCom ( bool  isEnabled) [virtual]

Use to enable or disable latency compensation. Default: Enabled

Implements BWAPI::Game.

void BWAPI::GameImpl::setLocalSpeed ( int  speed = -1) [virtual]

Sets the speed of the game to the given number. Lower numbers are faster. 0 is the fastest speed StarCraft can handle (which is about as fast as the fastest speed you can view a replay at). Any negative value will reset the speed to the StarCraft default.

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::setLocalSpeed ( int  speed = -1) [virtual]

Sets the speed of the game to the given number. Lower numbers are faster. 0 is the fastest speed StarCraft can handle (which is about as fast as the fastest speed you can view a replay at). Any negative value will reset the speed to the StarCraft default.

Implements BWAPI::Game.

bool BWAPI::GameImpl::setMap ( const char *  mapFileName) [virtual]

Changes the map to the one specified. Changes do not take effect unless the game is restarted.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::setMap ( const char *  mapFileName) [virtual]

Changes the map to the one specified. Changes do not take effect unless the game is restarted.

Implements BWAPI::Game.

bool BWAPI::GameImpl::setReplayVision ( BWAPI::Player player,
bool  enabled = true 
) [virtual]

Hides or reveals a player in a replay.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::setReplayVision ( BWAPI::Player player,
bool  enabled = true 
) [virtual]

Hides or reveals a player in a replay.

Implements BWAPI::Game.

bool BWAPI::GameImpl::setRevealAll ( bool  reveal = true) [virtual]

Enables or disables the Fog of War in a replay.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool BWAPI::GameImpl::setRevealAll ( bool  reveal = true) [virtual]

Enables or disables the Fog of War in a replay.

Implements BWAPI::Game.

void BWAPI::GameImpl::setScreenPosition ( int  x,
int  y 
) [virtual]

Moves the screen to the given position on the map. The position specified where the top left corner of the screen will be.

Implements BWAPI::Game.

Here is the call graph for this function:

Here is the caller graph for this function:

Moves the screen to the given position on the map. The position specified where the top left corner of the screen will be.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::setScreenPosition ( int  x,
int  y 
) [virtual]

Moves the screen to the given position on the map. The position specified where the top left corner of the screen will be.

Implements BWAPI::Game.

virtual void BWAPI::GameImpl::setScreenPosition ( BWAPI::Position  p) [virtual]

Moves the screen to the given position on the map. The position specified where the top left corner of the screen will be.

Implements BWAPI::Game.

void BWAPI::GameImpl::setTextSize ( int  size = 1) [virtual]

Implements BWAPI::Game.

Here is the caller graph for this function:

virtual void BWAPI::GameImpl::setTextSize ( int  size = 1) [virtual]

Implements BWAPI::Game.

bool BWAPI::GameImpl::setVision ( BWAPI::Player player,
bool  enabled = true 
) [virtual]

Sets the BWAPI player's vision with another player.

Implements BWAPI::Game.

Here is the call graph for this function:

virtual bool BWAPI::GameImpl::setVision ( BWAPI::Player player,
bool  enabled = true 
) [virtual]

Sets the BWAPI player's vision with another player.

Implements BWAPI::Game.

void BWAPI::GameImpl::startGame ( ) [virtual]

Starts the game in the pre-game lobby. Should be used only in the pre-game lobby, and not during counting

Implements BWAPI::Game.

Here is the call graph for this function:

virtual void BWAPI::GameImpl::startGame ( ) [virtual]

Used to start the game while in a lobby. Note that there is no onLobbyEnter callback yet, so this function cannot be used at this time.

Implements BWAPI::Game.

Here is the caller graph for this function:

Updates unitArrayCopy according to bw memory

Here is the caller graph for this function:


Member Data Documentation

std::vector<std::string> BWAPI::GameImpl::autoMapPool

Count of game-frames passed from game start.

std::list<std::string > BWAPI::GameImpl::sentMessages

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines