MCPcopy Create free account
hub / github.com/Blizzard/s2client-api / TestObservationInterface

Function TestObservationInterface

tests/test_observation_interface.cc:319–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317//
318
319bool TestObservationInterface(int argc, char** argv) {
320 Coordinator coordinator;
321 if (!coordinator.LoadSettings(argc, argv)) {
322 return false;
323 }
324
325 // Add the custom bot, it will control the players.
326 TestObservationBot bot;
327
328 coordinator.SetParticipants({
329 CreateParticipant(sc2::Race::Terran, &bot),
330 });
331
332 // Start the game.
333 coordinator.LaunchStarcraft();
334 coordinator.StartGame(sc2::kMapEmpty);
335
336 // Step forward the game simulation.
337 while (!bot.IsFinished()) {
338 coordinator.Update();
339 }
340
341 return bot.Success();
342}
343
344}
345

Callers

nothing calls this directly

Calls 8

CreateParticipantFunction · 0.85
LoadSettingsMethod · 0.80
SetParticipantsMethod · 0.80
LaunchStarcraftMethod · 0.80
StartGameMethod · 0.80
UpdateMethod · 0.80
SuccessMethod · 0.80
IsFinishedMethod · 0.45

Tested by

no test coverage detected