BWAPI
Public Member Functions
TestModule Class Reference

#include <TestModule.h>

Inheritance diagram for TestModule:
Inheritance graph
[legend]
Collaboration diagram for TestModule:
Collaboration graph
[legend]

List of all members.

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)
TestCasegetCurrentTestCase () const

Constructor & Destructor Documentation


Member Function Documentation

void TestModule::addTestCase ( TestCase testCase)
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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines