| 147 | } |
| 148 | |
| 149 | void AutoMenuManager::chooseNewRandomMap() |
| 150 | { |
| 151 | if (!this->autoMapPool.empty()) |
| 152 | { |
| 153 | std::string chosen; |
| 154 | if (this->autoMapIteration == "RANDOM") |
| 155 | { |
| 156 | // Obtain a random map file |
| 157 | std::sample(autoMapPool.begin(), autoMapPool.end(), &chosen, 1, mt); |
| 158 | } |
| 159 | else if (this->autoMapIteration == "SEQUENCE") |
| 160 | { |
| 161 | if (this->lastAutoMapEntry >= this->autoMapPool.size()) |
| 162 | this->lastAutoMapEntry = 0; |
| 163 | chosen = this->autoMapPool[this->lastAutoMapEntry++]; |
| 164 | } |
| 165 | this->lastMapGen = this->autoMenuMapPath + chosen; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | unsigned int getLobbyPlayerCount() |
| 170 | { |
no test coverage detected