21 class ObservationInterface;
24 class ControlInterface;
93 virtual void OnError(
const std::vector<ClientError>& ,
const std::vector<std::string>& = {}) {}
120 ControlImp* control_imp_;
138 bool operator()(
const Unit& unit);
A set of common events a user can override in their derived bot or replay observer class...
Definition: sc2_client.h:44
virtual void OnBuildingConstructionComplete(const Unit *)
Definition: sc2_client.h:80
A unit. Could be a structure, a worker or a military unit.
Definition: sc2_unit.h:69
virtual void OnError(const std::vector< ClientError > &, const std::vector< std::string > &={})
Called for various errors the library can encounter. See ClientError enum for possible errors...
Definition: sc2_client.h:93
Definition: sc2_interfaces.h:236
virtual void OnNydusDetected()
Called when a nydus is placed.
Definition: sc2_client.h:83
virtual void OnNuclearLaunchDetected()
Called when a nuclear launch is detected.
Definition: sc2_client.h:86
virtual void OnUnitDestroyed(const Unit *)
Definition: sc2_client.h:61
The base class for Agent and ReplayObserver.
Definition: sc2_client.h:97
Definition: sc2_action.h:9
ClientError
Definition: sc2_client.h:28
virtual void OnGameEnd()
Called when a game has ended.
Definition: sc2_client.h:53
A list of enums provided for your convenience.
bool IsCarryingMinerals(const Unit &unit)
bool IsCarryingVespene(const Unit &unit)
The ObservationInterface reflects the current state of the game. Guaranteed to be valid when OnGameSt...
Definition: sc2_interfaces.h:47
Definition: sc2_types.h:19
virtual void OnStep()
Definition: sc2_client.h:57
Definition: sc2_control_interfaces.h:16
virtual void OnGameFullStart()
Called when a game is started after a load. Fast restarting will not call this.
Definition: sc2_client.h:47
virtual void OnGameStart()
Called when a game is started or restarted.
Definition: sc2_client.h:50
virtual void OnUnitIdle(const Unit *)
Definition: sc2_client.h:72
virtual void OnUnitEnterVision(const Unit *)
Definition: sc2_client.h:90
Definition: sc2_interfaces.h:423
virtual void OnUnitCreated(const Unit *)
Definition: sc2_client.h:65
Definition: sc2_client.h:137
virtual void OnUpgradeCompleted(UpgradeID)
Definition: sc2_client.h:76