MCPcopy Create free account
hub / github.com/bwapi/bwapi / start

Method start

bwapi/TestAIModule/Source/BurrowTest.cpp:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 running = false;
27}
28void BurrowTest::start()
29{
30 if (fail) return;
31 running = true;
32
33 int userCount = Broodwar->self()->completedUnitCount(unitType);
34 FAILTEST(userCount>=1);
35 for (Unit u : Broodwar->self()->getUnits())
36 if (u->getType()==unitType)
37 unit = u;
38
39 FAILTEST(unit!=NULL);
40 FAILTEST(unit->exists());
41 FAILTEST(unit->isBurrowed()==false);
42 unit->burrow();
43 FAILTEST(unit->getOrder()==Orders::Burrowing);
44 startFrame = Broodwar->getFrameCount();
45 nextFrame = Broodwar->getFrameCount();
46
47}
48void BurrowTest::update()
49{
50 if (running == false) return;

Callers

nothing calls this directly

Calls 9

completedUnitCountMethod · 0.80
isBurrowedMethod · 0.80
selfMethod · 0.45
getUnitsMethod · 0.45
getTypeMethod · 0.45
existsMethod · 0.45
burrowMethod · 0.45
getOrderMethod · 0.45
getFrameCountMethod · 0.45

Tested by

no test coverage detected