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

Method onStart

bwapi/TestAIModule/Source/ProtossTest.cpp:21–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace std;
20using namespace BWAPI;
21void ProtossTest::onStart()
22{
23 //Broodwar->setCommandOptimizationLevel(2);
24
25 BWAssert(Broodwar->isReplay()==false);
26 Broodwar->enableFlag(Flag::CompleteMapInformation);
27
28 Broodwar->setLocalSpeed(0);
29 Broodwar->setFrameSkip(512);
30 this->addTestCase(new TrainTest(UnitTypes::Protoss_Probe));
31 this->addTestCase(new RightClickTest(UnitTypes::Protoss_Probe,UnitTypes::Protoss_Nexus,UnitTypes::Protoss_Nexus));
32 this->addTestCase(new MPHSTest(UnitTypes::Protoss_Probe));
33 this->addTestCase(new AttackMoveTest(UnitTypes::Protoss_Probe));
34 this->addTestCase(new AttackUnitTest(UnitTypes::Protoss_Probe,UnitTypes::Protoss_Nexus));
35 this->addTestCase(new FollowTest(UnitTypes::Protoss_Probe,UnitTypes::Protoss_Nexus));
36 this->addTestCase(new RallyTest(UnitTypes::Protoss_Nexus));
37 this->addTestCase(new CancelConstructionTest(UnitTypes::Protoss_Nexus));
38 this->addTestCase(new BuildTest(UnitTypes::Protoss_Nexus));
39 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
40 this->addTestCase(new BuildTest(UnitTypes::Protoss_Assimilator));
41
42 this->addTestCase(new CancelConstructionTest(UnitTypes::Protoss_Gateway));
43 this->addTestCase(new BuildTest(UnitTypes::Protoss_Gateway));
44 this->addTestCase(new RallyTest(UnitTypes::Protoss_Gateway));
45 this->addTestCase(new GatherTest());
46 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
47 this->addTestCase(new BuildTest(UnitTypes::Protoss_Forge));
48 this->addTestCase(new BuildTest(UnitTypes::Protoss_Photon_Cannon));
49 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
50 this->addTestCase(new BuildTest(UnitTypes::Protoss_Cybernetics_Core));
51 this->addTestCase(new BuildTest(UnitTypes::Protoss_Shield_Battery));
52
53 this->addTestCase(new CancelConstructionTest(UnitTypes::Protoss_Pylon));
54 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
55
56 this->addTestCase(new CancelConstructionTest(UnitTypes::Protoss_Robotics_Facility));
57 this->addTestCase(new BuildTest(UnitTypes::Protoss_Robotics_Facility));
58 this->addTestCase(new RallyTest(UnitTypes::Protoss_Robotics_Facility));
59 this->addTestCase(new CancelConstructionTest(UnitTypes::Protoss_Stargate));
60 this->addTestCase(new BuildTest(UnitTypes::Protoss_Stargate));
61 this->addTestCase(new RallyTest(UnitTypes::Protoss_Stargate));
62 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
63 this->addTestCase(new BuildTest(UnitTypes::Protoss_Citadel_of_Adun));
64 this->addTestCase(new BuildTest(UnitTypes::Protoss_Robotics_Support_Bay));
65
66 this->addTestCase(new BuildTest(UnitTypes::Protoss_Pylon));
67
68 this->addTestCase(new BuildTest(UnitTypes::Protoss_Fleet_Beacon));
69 this->addTestCase(new BuildTest(UnitTypes::Protoss_Templar_Archives));
70 this->addTestCase(new BuildTest(UnitTypes::Protoss_Observatory));
71 this->addTestCase(new BuildTest(UnitTypes::Protoss_Arbiter_Tribunal));
72
73 this->addTestCase(new CancelTrainTest(UnitTypes::Protoss_Zealot,UnitTypes::Protoss_Dragoon,UnitTypes::Protoss_High_Templar));
74 this->addTestCase(new CancelTrainTest(UnitTypes::Protoss_High_Templar,UnitTypes::Protoss_Dark_Templar,UnitTypes::Protoss_Zealot));
75 this->addTestCase(new TrainTest(UnitTypes::Protoss_Zealot));
76 this->addTestCase(new MPHSTest(UnitTypes::Protoss_Zealot));
77 this->addTestCase(new AttackMoveTest(UnitTypes::Protoss_Zealot));
78 this->addTestCase(new AttackUnitTest(UnitTypes::Protoss_Zealot,UnitTypes::Protoss_Gateway));

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