3 #include "sc2api/sc2_data.h" 4 #include "sc2api/sc2_proto_interface.h" 6 #include "sc2api/sc2_game_settings.h" 14 struct InterfaceSettings;
21 virtual bool Connect(
const std::string& address,
int port,
int timeout_ms) = 0;
22 virtual bool RemoteSaveMap(
const void* data,
int data_size, std::string remote_path) = 0;
23 virtual bool CreateGame(
const std::string& map_path,
const std::vector<PlayerSetup>& players,
bool realtime) = 0;
26 virtual bool WaitJoinGame() = 0;
28 virtual bool RequestLeaveGame() = 0;
29 virtual bool PollLeaveGame() = 0;
31 virtual bool Step(
int count = 1) = 0;
32 virtual bool WaitStep() = 0;
34 virtual bool SaveReplay(
const std::string& path) = 0;
36 virtual bool Ping() = 0;
39 virtual GameResponsePtr WaitForResponse() = 0;
40 virtual void SetProcessInfo(
const ProcessInfo& pi) = 0;
41 virtual const ProcessInfo& GetProcessInfo()
const = 0;
43 virtual AppState GetAppState()
const = 0;
45 virtual SC2APIProtocol::Status GetLastStatus()
const = 0;
46 virtual bool IsInGame()
const = 0;
47 virtual bool IsFinishedGame()
const = 0;
48 virtual bool IsReadyForCreateGame()
const = 0;
49 virtual bool HasResponsePending()
const = 0;
51 virtual bool GetObservation() = 0;
52 virtual bool PollResponse() = 0;
53 virtual bool ConsumeResponse() = 0;
55 virtual bool IssueEvents(
const std::vector<Tag>& commands = {}) = 0;
56 virtual void OnGameStart() = 0;
59 virtual void DumpProtoUsage() = 0;
61 virtual void Error(
ClientError error,
const std::vector<std::string>& errors={}) = 0;
62 virtual void ErrorIf(
bool condition,
ClientError error,
const std::vector<std::string>& errors={}) = 0;
64 virtual const std::vector<ClientError>& GetClientErrors()
const = 0;
65 virtual const std::vector<std::string>& GetProtocolErrors()
const = 0;
67 virtual void ClearClientErrors() = 0;
68 virtual void ClearProtocolErrors() = 0;
70 virtual void UseGeneralizedAbility(
bool value) = 0;
73 virtual void Save() = 0;
74 virtual void Load() = 0;
81 virtual bool Restart() = 0;
88 virtual bool GatherReplayInfo(
const std::string& path,
bool download_data =
false) = 0;
89 virtual bool LoadReplay(
const std::string& replay_path,
const InterfaceSettings& settings, uint32_t player_id,
bool realtime=
false) = 0;
90 virtual bool WaitForReplay() = 0;
91 virtual void UseGeneralizedAbility(
bool value) = 0;
93 virtual const ReplayInfo& GetReplayInfo()
const = 0;
Information about a running process.
Definition: sc2_game_settings.h:11
Information about a replay file.
Definition: sc2_gametypes.h:163
Definition: sc2_action.h:9
ClientError
Definition: sc2_client.h:28
Settings for rendered feature layer output.
Definition: sc2_game_settings.h:83
Port setup for one or more clients in a game.
Definition: sc2_gametypes.h:110
Definition: sc2_control_interfaces.h:84
The base class for Agent and ReplayObserver.
Definition: sc2_control_interfaces.h:16
Definition: sc2_proto_interface.h:85
Setup for a player in a game.
Definition: sc2_gametypes.h:57
Definition: sc2_control_interfaces.h:77