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

Method GameImpl

bwapi/BWAPI/Source/BWAPI/GameInternals.cpp:33–52  ·  view source on GitHub ↗

---------------------------------------------- CONSTRUCTOR -----------------------------------------------

Source from the content-addressed store, hash-verified

31
32 //---------------------------------------------- CONSTRUCTOR -----------------------------------------------
33 GameImpl::GameImpl()
34 {
35 BWAPI::BroodwarPtr = static_cast<Game*>(this);
36
37 BWtoBWAPI_init();
38
39 // iterate through players and create PlayerImpl for each
40 for (u8 i = 0; i < BW::PLAYER_COUNT; ++i)
41 players[i] = new PlayerImpl(i);
42
43 // iterate through units and create UnitImpl for each
44 for (u16 i = 0; i < BW::UNIT_ARRAY_MAX_LENGTH; ++i)
45 unitArray[i] = new UnitImpl(&BW::BWDATA::UnitNodeTable[i], i);
46
47 // iterate through bullets and create BulletImpl for each
48 for (u16 i = 0; i < BW::BULLET_ARRAY_MAX_LENGTH; ++i)
49 bulletArray[i] = new BulletImpl(&BW::BWDATA::BulletNodeTable[i], i);
50
51 this->initializeData();
52 }
53 //----------------------------------------------- DESTRUCTOR -----------------------------------------------
54 GameImpl::~GameImpl()
55 {

Callers

nothing calls this directly

Calls 2

initializeDataMethod · 0.95
BWtoBWAPI_initFunction · 0.85

Tested by

no test coverage detected