21 class ObservationInterface;
24 class ControlInterface;
106 virtual void OnError(
const std::vector<ClientError>& ,
const std::vector<std::string>& = {}) {}
133 ControlImp* control_imp_;
151 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 OnUnitDamaged(const Unit *, float, float)
Definition: sc2_client.h:93
virtual void OnBuildingConstructionComplete(const Unit *)
Called when the unit in the previous step had a build progress less than 1.0 but is greater than or e...
Definition: sc2_client.h:87
A unit. Could be a structure, a worker or a military unit.
Definition: sc2_unit.h:70
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:106
Definition: sc2_interfaces.h:239
virtual void OnNydusDetected()
Called when a nydus is placed.
Definition: sc2_client.h:96
virtual void OnNuclearLaunchDetected()
Called when a nuclear launch is detected.
Definition: sc2_client.h:99
virtual void OnUnitDestroyed(const Unit *)
Definition: sc2_client.h:63
The base class for Agent and ReplayObserver.
Definition: sc2_client.h:110
Definition: sc2_action.h:9
ClientError
Definition: sc2_client.h:28
virtual void OnGameEnd()
Called when a game has ended.
Definition: sc2_client.h:55
A list of enums provided for your convenience.
bool IsCarryingMinerals(const Unit &unit)
virtual void OnNeutralUnitCreated(const Unit *)
Definition: sc2_client.h:67
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:59
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:49
virtual void OnGameStart()
Called when a game is started or restarted.
Definition: sc2_client.h:52
virtual void OnUnitIdle(const Unit *)
Definition: sc2_client.h:78
virtual void OnUnitEnterVision(const Unit *)
Definition: sc2_client.h:103
Definition: sc2_interfaces.h:427
virtual void OnUnitCreated(const Unit *)
Definition: sc2_client.h:71
Definition: sc2_client.h:150
virtual void OnUpgradeCompleted(UpgradeID)
Definition: sc2_client.h:82