* Remove @a mission from the list of possible missions for @a region. * @param region The region id. * @param mission The mission id. * @return If there are no more regions with missions available. */
| 147 | * @return If there are no more regions with missions available. |
| 148 | */ |
| 149 | bool AlienStrategy::removeMission(const std::string ®ion, const std::string &mission) |
| 150 | { |
| 151 | MissionsByRegion::iterator found = _regionMissions.find(region); |
| 152 | assert(found != _regionMissions.end()); |
| 153 | found->second->set(mission, 0); |
| 154 | if (found->second->empty()) |
| 155 | { |
| 156 | _regionMissions.erase(found); |
| 157 | _regionChances.set(region, 0); |
| 158 | } |
| 159 | return _regionMissions.empty(); |
| 160 | } |
| 161 | |
| 162 | } |
no test coverage detected