BWAPI
|
#include <QuorumModule.h>
Public Member Functions | |
virtual void | onStart () |
virtual void | onEnd (bool isWinner) |
virtual void | onFrame () |
virtual void | onSendText (std::string text) |
virtual void | onReceiveText (BWAPI::Player *player, std::string text) |
virtual void | onPlayerLeft (BWAPI::Player *player) |
virtual void | onNukeDetect (BWAPI::Position target) |
virtual void | onUnitDiscover (BWAPI::Unit *unit) |
virtual void | onUnitEvade (BWAPI::Unit *unit) |
virtual void | onUnitShow (BWAPI::Unit *unit) |
virtual void | onUnitHide (BWAPI::Unit *unit) |
virtual void | onUnitCreate (BWAPI::Unit *unit) |
virtual void | onUnitDestroy (BWAPI::Unit *unit) |
virtual void | onUnitMorph (BWAPI::Unit *unit) |
virtual void | onUnitRenegade (BWAPI::Unit *unit) |
virtual void | onSaveGame (std::string gameName) |
void | drawStats () |
void | drawBullets () |
void | drawVisibilityData () |
void | drawTerrainData () |
void | showPlayers () |
void | showForces () |
void | setUp () |
Public Attributes | |
bool | show_bullets |
bool | show_visibility_data |
void QuorumModule::drawBullets | ( | ) |
void QuorumModule::drawStats | ( | ) |
void QuorumModule::drawTerrainData | ( | ) |
void QuorumModule::drawVisibilityData | ( | ) |
void QuorumModule::onEnd | ( | bool | isWinner | ) | [virtual] |
BWAPI calls this at the end of the match. isWinner will be true if the AIModule won the game. If the game is a replay, isWinner will always be false.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onFrame | ( | ) | [virtual] |
BWAPI calls this on every logical frame in the game.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onNukeDetect | ( | BWAPI::Position | target | ) | [virtual] |
BWAPI calls this when a nuclear launch has been detected. If the target position is visible, or if Complete Map Information is enabled, the target position will also be provided. If Complete Map Information is disabled and the target position is not visible, target will be set to Positions::Unknown.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onPlayerLeft | ( | BWAPI::Player * | player | ) | [virtual] |
BWAPI calls this when a player leaves the game.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onReceiveText | ( | BWAPI::Player * | player, |
std::string | text | ||
) | [virtual] |
BWAPI calls this when another player sends a message.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onSaveGame | ( | std::string | gameName | ) | [virtual] |
void QuorumModule::onSendText | ( | std::string | text | ) | [virtual] |
If Flag::UserInput is enabled, BWAPI will call this each time a user enters a message into the chat.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onStart | ( | ) | [virtual] |
BWAPI calls this at the start of a match. Typically an AI will execute set up code in this method (initialize data structures, load build orders, etc).
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitCreate | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit is created. Note that this is NOT called when a unit changes type (such as larva into egg or egg into drone). Building a refinery/assimilator/extractor will not produce an onUnitCreate call since the vespene geyser changes to the unit type of the refinery/assimilator/extractor. If Complete Map Information is enabled, this will also be called for new units that are hidden by the fog of war. If the unit is visible upon creation, onUnitShow will be called shortly after onUnitCreate is called.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitDestroy | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit dies or otherwise removed from the game (i.e. a mined out mineral patch). When a zerg drone becomes an extractor, the Vespene geyser changes to the Zerg Extractor type and the drone is removed. If Complete Map Information is enabled, this will also be called for units that are hidden by the fog of war. If a unit that was visible gets destroyed, onUnitHide will be called right before onUnitDestroy is called.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitDiscover | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit becomes accessible.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitEvade | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit becomes inaccessible.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitHide | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this right before a unit becomes invisible, so if you want your non-cheating AI to remember where it last saw a unit, this callback would be a good place to implement it. The complete map information flag has no effect on this callback.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitMorph | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit changes type, such as from a Zerg Drone to a Zerg Hatchery, or from a Terran Siege Tank Tank Mode to Terran Siege Tank Siege Mode. This is not called when the type changes to or from UnitTypes::Unknown (which happens when a unit becomes visible or invisible).
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitRenegade | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when an accessible unit changes ownership.
Reimplemented from BWAPI::AIModule.
void QuorumModule::onUnitShow | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this the instant a previously invisible unit becomes visible. The complete map information flag has no effect on this callback.
Reimplemented from BWAPI::AIModule.
void QuorumModule::setUp | ( | ) |
void QuorumModule::showForces | ( | ) |
void QuorumModule::showPlayers | ( | ) |