BWAPI
|
#include <TestModule.h>
Public Member Functions | |
TestModule () | |
~TestModule () | |
virtual void | onFrame () |
virtual void | onUnitCreate (BWAPI::Unit *unit) |
virtual void | onUnitDestroy (BWAPI::Unit *unit) |
void | runTestCases () |
void | addTestCase (TestCase *testCase) |
TestCase * | getCurrentTestCase () const |
void TestModule::addTestCase | ( | TestCase * | testCase | ) |
TestCase * TestModule::getCurrentTestCase | ( | ) | const |
void TestModule::onFrame | ( | ) | [virtual] |
BWAPI calls this on every logical frame in the game.
Reimplemented from BWAPI::AIModule.
Reimplemented in EventTest, DefaultTestModule, ExistenceTest, and InterceptorTest.
void TestModule::onUnitCreate | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit is created. Note that this is NOT called when a unit changes type (such as larva into egg or egg into drone). Building a refinery/assimilator/extractor will not produce an onUnitCreate call since the vespene geyser changes to the unit type of the refinery/assimilator/extractor. If Complete Map Information is enabled, this will also be called for new units that are hidden by the fog of war. If the unit is visible upon creation, onUnitShow will be called shortly after onUnitCreate is called.
Reimplemented from BWAPI::AIModule.
Reimplemented in EventTest, and ExistenceTest.
void TestModule::onUnitDestroy | ( | BWAPI::Unit * | unit | ) | [virtual] |
BWAPI calls this when a unit dies or otherwise removed from the game (i.e. a mined out mineral patch). When a zerg drone becomes an extractor, the Vespene geyser changes to the Zerg Extractor type and the drone is removed. If Complete Map Information is enabled, this will also be called for units that are hidden by the fog of war. If a unit that was visible gets destroyed, onUnitHide will be called right before onUnitDestroy is called.
Reimplemented from BWAPI::AIModule.
Reimplemented in EventTest, and ExistenceTest.
void TestModule::runTestCases | ( | ) |