MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / tryToPlaceInitialFacilities

Function tryToPlaceInitialFacilities

game/state/city/base.cpp:194–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194static bool tryToPlaceInitialFacilities(GameState &state, Base &base)
195{
196 for (auto &facilityTypePair : state.initial_facilities)
197 {
198 StateRef<FacilityType> facilityType{&state, facilityTypePair.first};
199 auto count = facilityTypePair.second;
200 for (unsigned int i = 0; i < count; i++)
201 {
202 if (!randomlyPlaceFacility(state, base, facilityType))
203 {
204 return false;
205 }
206 }
207 }
208 return true;
209}
210
211void Base::startingBase(GameState &state)
212{

Callers 1

startingBaseMethod · 0.85

Calls 1

randomlyPlaceFacilityFunction · 0.85

Tested by

no test coverage detected