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

Method onStart

bwapi/DevAIModule/Source/DevAIModule.cpp:19–40  ·  view source on GitHub ↗

///////////////////////////

Source from the content-addressed store, hash-verified

17
18////////////////////////////////
19void DevAIModule::onStart()
20{
21 // enable stuff
22 bw->enableFlag(Flag::UserInput);
23 //bw->enableFlag(Flag::CompleteMapInformation);
24
25 // save player info
26 self = bw->self();
27
28 // save map info
29 mapH = bw->mapHeight();
30 mapW = bw->mapWidth();
31
32 // make things go fast
33 //bw->setLocalSpeed(0);
34 //bw->setFrameSkip(16);
35
36 // set command optimization
37 bw->setCommandOptimizationLevel(0);
38 //147...610
39 bw << "Random Seed: " << bw->getRandomSeed() << std::endl;
40}
41
42void DevAIModule::onEnd(bool isWinner)
43{

Callers

nothing calls this directly

Calls 6

enableFlagMethod · 0.45
selfMethod · 0.45
mapHeightMethod · 0.45
mapWidthMethod · 0.45
getRandomSeedMethod · 0.45

Tested by

no test coverage detected