| 97 | |
| 98 | } |
| 99 | void GameImpl::clearAll() |
| 100 | { |
| 101 | //clear everything |
| 102 | inGame = false; |
| 103 | startLocations.clear(); |
| 104 | forces.clear(); |
| 105 | playerSet.clear(); |
| 106 | bullets.clear(); |
| 107 | accessibleUnits.clear(); |
| 108 | minerals.clear(); |
| 109 | geysers.clear(); |
| 110 | neutralUnits.clear(); |
| 111 | staticMinerals.clear(); |
| 112 | staticGeysers.clear(); |
| 113 | staticNeutralUnits.clear(); |
| 114 | selectedUnits.clear(); |
| 115 | pylons.clear(); |
| 116 | events.clear(); |
| 117 | thePlayer = nullptr; |
| 118 | theEnemy = nullptr; |
| 119 | theNeutral = nullptr; |
| 120 | _allies.clear(); |
| 121 | _enemies.clear(); |
| 122 | _observers.clear(); |
| 123 | |
| 124 | //clear unit data |
| 125 | for (auto &v : unitVector) |
| 126 | v.clear(); |
| 127 | |
| 128 | //clear player data |
| 129 | for (auto &v : playerVector) |
| 130 | v.units.clear(); |
| 131 | |
| 132 | for( Region r : regionsList ) |
| 133 | delete static_cast<RegionImpl*>(r); |
| 134 | regionsList.clear(); |
| 135 | regionArray.fill(nullptr); |
| 136 | } |
| 137 | |
| 138 | //------------------------------------------- INTERFACE EVENT UPDATE --------------------------------------- |
| 139 | void GameImpl::processInterfaceEvents() |