---------------------------------------------- CONSTRUCTOR -----------------------------------------------
| 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 | { |
nothing calls this directly
no test coverage detected