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

Method stop

bwapi/TestAIModule/Source/UpgradeTest.cpp:121–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void UpgradeTest::stop()
122{
123 if (fail == true) return;
124 BWAssertF(upgrader!=NULL,{fail=true;LOGTYPE;return;});
125 BWAssertF(upgrader->getOrder()==Orders::Nothing,{fail=true;LOGTYPE;return;});
126 BWAssertF(upgrader->isIdle()==true,{fail=true;LOGTYPE;return;});
127 BWAssertF(upgrader->isLifted()==false,{fail=true;LOGTYPE;return;});
128 BWAssertF(upgrader->isResearching()==false,{fail=true;LOGTYPE;return;});
129 BWAssertF(upgrader->isUpgrading()==false,{fail=true;LOGTYPE;return;});
130 BWAssertF(upgrader->getTech()==TechTypes::None,{fail=true;LOGTYPE;return;});
131 BWAssertF(upgrader->getUpgrade()==UpgradeTypes::None,{fail=true;LOGTYPE;return;});
132 BWAssertF(upgrader->getRemainingResearchTime()==0,{fail=true;LOGTYPE;return;});
133 BWAssertF(upgrader->getRemainingUpgradeTime()==0,{fail=true;LOGTYPE;return;});
134 BWAssertF(Broodwar->self()->getUpgradeLevel(upgradeType)==previousUpgradeLevel+1,{fail=true;LOGTYPE;return;});
135 BWAssertF(Broodwar->self()->minerals() == correctMineralCount,{fail=true;LOGTYPE;return;});
136 BWAssertF(Broodwar->self()->gas() == correctGasCount,{fail=true;LOGTYPE;return;});
137}

Callers

nothing calls this directly

Calls 13

isIdleMethod · 0.80
isLiftedMethod · 0.80
getUpgradeMethod · 0.80
getUpgradeLevelMethod · 0.80
mineralsMethod · 0.80
gasMethod · 0.80
getOrderMethod · 0.45
isResearchingMethod · 0.45
isUpgradingMethod · 0.45
getTechMethod · 0.45

Tested by

no test coverage detected