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

Function isMapComplete

game/state/rules/battle/battlemap.cpp:418–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418bool isMapComplete(std::vector<sp<BattleMapSector>> &sec_map, const Vec3<int> &map_size)
419{
420 // We check if every single cell of a map intersects with at least some sector
421 bool complete = true;
422 for (int x1 = 0; x1 < map_size.x; x1++)
423 for (int y1 = 0; y1 < map_size.y; y1++)
424 for (int z1 = 0; z1 < map_size.z; z1++)
425 complete = complete && doesCellIntersectSomething(sec_map, map_size, x1, y1, z1);
426 return complete;
427}
428
429bool placeSector(GameState &state, std::vector<sp<BattleMapSector>> &sec_map,
430 const Vec3<int> &map_size, const sp<BattleMapSector> sector, bool force = false,

Callers 1

generateMapMethod · 0.85

Calls 1

Tested by

no test coverage detected