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

Method execute

bwapi/BWScriptEmulator/Set_RandomSeed.cpp:8–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6IMPLEMENT(Set_RandomSeed);
7
8bool Set_RandomSeed::execute(aithread &thread) const
9{
10 // Parameter
11 DWORD dwRandomSeed;
12 thread.readTuple( std::tie(dwRandomSeed) );
13
14 // Set random seed (the noob way)
15 srand(dwRandomSeed);
16
17 // Save debug info and return
18 thread.saveDebug(Text::Green, this->getOpcode(), "%X", dwRandomSeed);
19 return true;
20}

Callers

nothing calls this directly

Calls 3

saveDebugMethod · 0.80
getOpcodeMethod · 0.80
readTupleMethod · 0.45

Tested by

no test coverage detected