| 86 | { |
| 87 | |
| 88 | std::shared_future<void> loadBattleBuilding(sp<GameState> state, sp<Building> building, |
| 89 | bool hotseat, bool raid, |
| 90 | std::list<StateRef<Agent>> playerAgents, |
| 91 | StateRef<Vehicle> playerVehicle) |
| 92 | { |
| 93 | auto loadTask = fw().threadPoolEnqueue( |
| 94 | [hotseat, building, state, raid, playerAgents, playerVehicle]() mutable -> void |
| 95 | { |
| 96 | StateRef<Organisation> org = raid ? building->owner : state->getAliens(); |
| 97 | StateRef<Building> bld = {state.get(), building}; |
| 98 | |
| 99 | const std::map<StateRef<AgentType>, int> *aliens = nullptr; |
| 100 | const int *guards = nullptr; |
| 101 | const int *civilians = nullptr; |
| 102 | |
| 103 | Battle::beginBattle(*state, hotseat, org, playerAgents, aliens, guards, civilians, |
| 104 | playerVehicle, bld); |
| 105 | }); |
| 106 | return loadTask; |
| 107 | } |
| 108 | |
| 109 | std::shared_future<void> loadBattleVehicle(sp<GameState> state, StateRef<Vehicle> ufo, |
| 110 | StateRef<Vehicle> playerVehicle) |
no test coverage detected