| 23 | } |
| 24 | |
| 25 | void TestUnitCommand::OnStep() { |
| 26 | const ObservationInterface* obs = agent_->Observation(); |
| 27 | ActionInterface* act = agent_->Actions(); |
| 28 | |
| 29 | if (obs->GetGameLoop() < order_on_game_loop_) { |
| 30 | return; |
| 31 | } |
| 32 | |
| 33 | test_units_ = obs->GetUnits(Unit::Self, [&](const Unit& unit) { |
| 34 | return unit.unit_type == test_unit_type_; |
| 35 | }); |
| 36 | |
| 37 | if (test_units_.size() > 0) { |
| 38 | test_unit_ = test_units_.front(); |
| 39 | } |
| 40 | |
| 41 | IssueUnitCommand(act); |
| 42 | } |
| 43 | |
| 44 | void TestUnitCommand::OnTestFinish() { |
| 45 | VerifyUnitIdleAfterOrder(test_unit_type_); |
nothing calls this directly
no test coverage detected