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

Method stop

bwapi/TestAIModule/Source/MorphTest.cpp:241–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void MorphTest::stop()
242{
243 if (fail == true) return;
244 FAILTEST(producer!=NULL);
245 FAILTEST(producer->getType()==unitType);
246 FAILTEST(producer->isBeingConstructed()==false);
247 FAILTEST(producer->isBurrowed()==false);
248 FAILTEST(producer->isConstructing()==false);
249 FAILTEST(producer->isCompleted()==true);
250 FAILTEST(producer->isIdle()==true);
251 FAILTEST(producer->isMorphing()==false);
252 FAILTEST(producer->isTraining()==false);
253 FAILTEST(producer->getBuildType()==UnitTypes::None);
254 FAILTEST(producer->getBuildUnit()==NULL);
255 FAILTEST(producer->getRemainingTrainTime()==0);
256 FAILTEST(producer->getRemainingBuildTime()==0);
257 FAILTEST(Broodwar->self()->minerals() == correctMineralCount);
258 FAILTEST(Broodwar->self()->gas() == correctGasCount);
259 FAILTEST(Broodwar->self()->supplyUsed() == correctSupplyUsedCount);
260 if (unitType.isTwoUnitsInOneEgg())
261 {
262 FAILTEST(Broodwar->self()->completedUnitCount(unitType) == previousUnitCount+2);
263 }
264 else
265 {
266 FAILTEST(Broodwar->self()->completedUnitCount(unitType) == previousUnitCount+1);
267 }
268}

Callers

nothing calls this directly

Calls 15

isBeingConstructedMethod · 0.80
isBurrowedMethod · 0.80
isConstructingMethod · 0.80
isCompletedMethod · 0.80
isIdleMethod · 0.80
isMorphingMethod · 0.80
isTrainingMethod · 0.80
getBuildTypeMethod · 0.80
getBuildUnitMethod · 0.80
getRemainingTrainTimeMethod · 0.80
getRemainingBuildTimeMethod · 0.80
mineralsMethod · 0.80

Tested by

no test coverage detected