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

Method OnTestStart

tests/test_feature_layer.cc:222–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 uint32_t starting_gameloop_;
221
222 void OnTestStart() override {
223 starting_gameloop_ = agent_->Observation()->GetGameLoop();
224 const GameInfo& game_info = agent_->Observation()->GetGameInfo();
225 unit_pos_ = FindCenterOfMap(game_info);
226 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::ZERG_LURKERMP, unit_pos_);
227 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::ZERG_LURKERMP, unit_pos_ + Point2D(5,5));
228 agent_->Debug()->SendDebug();
229
230 wait_game_loops_ = 550;
231 }
232
233 void OnStep() override {
234 const ObservationInterface* obs = agent_->Observation();

Callers

nothing calls this directly

Calls 7

FindCenterOfMapFunction · 0.85
Point2DClass · 0.85
GetGameLoopMethod · 0.80
ObservationMethod · 0.80
DebugCreateUnitMethod · 0.80
DebugMethod · 0.80
SendDebugMethod · 0.80

Tested by

no test coverage detected