| 351 | // |
| 352 | |
| 353 | bool 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 | |
| 380 | bool TestFeatureLayers(int argc, char** argv) { |
| 381 | bool success = true; |
nothing calls this directly
no test coverage detected