SC2API
An API for AI for StarCraft II
Public Member Functions | List of all members
sc2::Client Class Reference

The base class for Agent and ReplayObserver. More...

#include <sc2_client.h>

Inheritance diagram for sc2::Client:
sc2::ClientEvents sc2::Agent sc2::ReplayObserver

Public Member Functions

const ObservationInterfaceObservation () const
 The ObservationInterface is used to query game state.
 
QueryInterfaceQuery ()
 The UnitQuery interface is used to issue commands to units.
 
DebugInterfaceDebug ()
 The DebugInterface allows a derived class to print text, draw primitive shapes and spawn/destroy units.
 
ControlInterfaceControl ()
 
const ControlInterfaceControl () const
 
void Reset ()
 
- Public Member Functions inherited from sc2::ClientEvents
virtual void OnGameFullStart ()
 Called when a game is started after a load. Fast restarting will not call this.
 
virtual void OnGameStart ()
 Called when a game is started or restarted.
 
virtual void OnGameEnd ()
 Called when a game has ended.
 
virtual void OnStep ()
 
virtual void OnUnitDestroyed (const Unit *)
 
virtual void OnUnitCreated (const Unit *)
 
virtual void OnUnitIdle (const Unit *)
 
virtual void OnUpgradeCompleted (UpgradeID)
 
virtual void OnBuildingConstructionComplete (const Unit *)
 
virtual void OnNydusDetected ()
 Called when a nydus is placed.
 
virtual void OnNuclearLaunchDetected ()
 Called when a nuclear launch is detected.
 
virtual void OnUnitEnterVision (const Unit *)
 
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.
 

Detailed Description

The base class for Agent and ReplayObserver.

Member Function Documentation

ControlInterface* sc2::Client::Control ( )

The ControlInterface is only meant to be used by the coordinator as it provides functionality for connecting to Starcraft2, setting up a websocket connection and issuing blocking commands via SC2's protocol.


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