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

Method OnTestStart

tests/test_observation_interface.cc:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 class TestGetFoodCount : public TestSequence{
68 void OnTestStart() {
69 wait_game_loops_ = 10;
70 const GameInfo& game_info = agent_->Observation()->GetGameInfo();
71 Point2D origin_pt_ = FindCenterOfMap(game_info);
72 Point2D offset_ = Point2D(10.0f, 10.0f);
73 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::PROTOSS_ZEALOT, origin_pt_, agent_->Observation()->GetPlayerID(), 10);
74 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::PROTOSS_PROBE, origin_pt_, agent_->Observation()->GetPlayerID(), 10);
75 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::PROTOSS_PYLON, origin_pt_ + offset_, agent_->Observation()->GetPlayerID(), 2);
76 agent_->Debug()->DebugCreateUnit(UNIT_TYPEID::PROTOSS_WARPGATE, origin_pt_ + offset_, agent_->Observation()->GetPlayerID(), 1);
77 agent_->Debug()->SendDebug();
78 }
79
80 void OnTestFinish() {
81 const ObservationInterface* obs = agent_->Observation();

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected