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

Method onStart

bwapi/TestAIModule/Source/ZergTest.cpp:23–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using namespace std;
22using namespace BWAPI;
23void ZergTest::onStart()
24{
25 BWAssert(Broodwar->isReplay()==false);
26 Broodwar->enableFlag(Flag::CompleteMapInformation);
27
28 Broodwar->setLocalSpeed(0);
29 Broodwar->setFrameSkip(512);
30 // Altered for lack of larva due to 10x speed-up in map settings
31 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
32 this->addTestCase(new BuildTest(UnitTypes::Zerg_Hatchery));
33 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
34 this->addTestCase(new BuildTest(UnitTypes::Zerg_Hatchery));
35
36 this->addTestCase(new CancelMorphTest(UnitTypes::Zerg_Drone));
37 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
38 this->addTestCase(new RightClickTest(UnitTypes::Zerg_Drone,UnitTypes::Zerg_Hatchery,UnitTypes::Zerg_Hatchery));
39 this->addTestCase(new MPHSTest(UnitTypes::Zerg_Drone));
40 this->addTestCase(new AttackMoveTest(UnitTypes::Zerg_Drone));
41 this->addTestCase(new AttackUnitTest(UnitTypes::Zerg_Drone,UnitTypes::Zerg_Hatchery));
42 this->addTestCase(new FollowTest(UnitTypes::Zerg_Drone,UnitTypes::Zerg_Hatchery));
43 this->addTestCase(new RallyTest(UnitTypes::Zerg_Hatchery));
44 this->addTestCase(new CancelConstructionTest(UnitTypes::Zerg_Hatchery));
45 this->addTestCase(new BuildTest(UnitTypes::Zerg_Hatchery));
46 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
47 this->addTestCase(new BuildTest(UnitTypes::Zerg_Hatchery));
48 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
49 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
50 this->addTestCase(new BuildTest(UnitTypes::Zerg_Creep_Colony));
51 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
52 this->addTestCase(new BuildTest(UnitTypes::Zerg_Creep_Colony));
53 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
54 this->addTestCase(new BuildTest(UnitTypes::Zerg_Creep_Colony));
55 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
56 this->addTestCase(new BuildTest(UnitTypes::Zerg_Extractor));
57 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
58 this->addTestCase(new CancelConstructionTest(UnitTypes::Zerg_Spawning_Pool));
59 this->addTestCase(new BuildTest(UnitTypes::Zerg_Spawning_Pool));
60 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
61 this->addTestCase(new GatherTest());
62 this->addTestCase(new BuildTest(UnitTypes::Zerg_Evolution_Chamber));
63 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
64 this->addTestCase(new BuildTest(UnitTypes::Zerg_Hydralisk_Den));
65
66 this->addTestCase(new CancelMorphTest(UnitTypes::Zerg_Sunken_Colony));
67 this->addTestCase(new MorphTest(UnitTypes::Zerg_Sunken_Colony));
68 this->addTestCase(new MorphTest(UnitTypes::Zerg_Spore_Colony));
69 this->addTestCase(new CancelMorphTest(UnitTypes::Zerg_Lair));
70 this->addTestCase(new MorphTest(UnitTypes::Zerg_Lair));
71 this->addTestCase(new RallyTest(UnitTypes::Zerg_Lair));
72 this->addTestCase(new MorphTest(UnitTypes::Zerg_Lair));
73
74 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
75 this->addTestCase(new CancelConstructionTest(UnitTypes::Zerg_Spire));
76 this->addTestCase(new BuildTest(UnitTypes::Zerg_Spire));
77 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
78 this->addTestCase(new BuildTest(UnitTypes::Zerg_Spire));
79 this->addTestCase(new MorphTest(UnitTypes::Zerg_Drone));
80 this->addTestCase(new BuildTest(UnitTypes::Zerg_Queens_Nest));

Callers

nothing calls this directly

Calls 5

addTestCaseMethod · 0.80
isReplayMethod · 0.45
enableFlagMethod · 0.45
setLocalSpeedMethod · 0.45
setFrameSkipMethod · 0.45

Tested by

no test coverage detected