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

Function TestFeatureLayers

tests/test_feature_layer.cc:353–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351//
352
353bool TestFeatureLayers(int argc, char** argv, const std::string& map, const sc2::FeatureLayerSettings& settings) {
354 Coordinator coordinator;
355 if (!coordinator.LoadSettings(argc, argv)) {
356 return false;
357 }
358
359 coordinator.SetFeatureLayers(settings);
360
361 // Add the custom bot, it will control the players.
362 FeatureLayerTestBot bot;
363
364 coordinator.SetParticipants({
365 CreateParticipant(sc2::Race::Terran, &bot),
366 });
367
368 // Start the game.
369 coordinator.LaunchStarcraft();
370 coordinator.StartGame(map);
371
372 // Step forward the game simulation.
373 while (!bot.IsFinished()) {
374 coordinator.Update();
375 }
376
377 return bot.Success();
378}
379
380bool TestFeatureLayers(int argc, char** argv) {
381 bool success = true;

Callers

nothing calls this directly

Calls 9

CreateParticipantFunction · 0.85
LoadSettingsMethod · 0.80
SetFeatureLayersMethod · 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