* Choose one of the regions for a mission. * @param rules Pointer to the ruleset. * @return The region id. */
| 117 | * @return The region id. |
| 118 | */ |
| 119 | const std::string AlienStrategy::chooseRandomRegion(const Ruleset *rules) |
| 120 | { |
| 121 | std::string chosen = _regionChances.choose(); |
| 122 | if (chosen == "") |
| 123 | { |
| 124 | init(rules); |
| 125 | chosen = _regionChances.choose(); |
| 126 | } |
| 127 | assert ("" != chosen); |
| 128 | return chosen; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Choose one missions available for @a region. |
no test coverage detected