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

Method stop

bwapi/TestAIModule/Source/TrainTest.cpp:118–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void TrainTest::stop()
119{
120 if (fail == true) return;
121 BWAssertF(producer!=NULL,{fail=true;return;});
122 BWAssertF(producer->isConstructing()==false,{fail=true;return;});
123 BWAssertF(producer->isIdle()==true,{fail=true;return;});
124 BWAssertF(producer->isLifted()==false,{fail=true;return;});
125 BWAssertF(producer->isTraining()==false,{fail=true;return;});
126 BWAssertF(producer->getTrainingQueue().empty()==true,{fail=true;return;});
127 BWAssertF(Broodwar->self()->minerals() == correctMineralCount,{fail=true;return;});
128 BWAssertF(Broodwar->self()->gas() == correctGasCount,{fail=true;return;});
129 BWAssertF(Broodwar->self()->supplyUsed() == correctSupplyUsedCount,{fail=true;return;});
130 if (unitType != UnitTypes::Protoss_Scarab)
131 BWAssertF(Broodwar->self()->completedUnitCount(unitType) == previousUnitCount+1,{fail=true;return;});
132}

Callers

nothing calls this directly

Calls 10

isConstructingMethod · 0.80
isIdleMethod · 0.80
isLiftedMethod · 0.80
isTrainingMethod · 0.80
getTrainingQueueMethod · 0.80
mineralsMethod · 0.80
gasMethod · 0.80
supplyUsedMethod · 0.80
completedUnitCountMethod · 0.80
selfMethod · 0.45

Tested by

no test coverage detected