migrate every factory query off BuildingSystem onto the free functions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "catch.hpp"
|
||||
#include "FactoryQueries.h"
|
||||
|
||||
#include <random>
|
||||
|
||||
@@ -100,7 +101,7 @@ TEST_CASE("WaveSystem: Simulation pre-places HQ + 2 player + 2 enemy stations",
|
||||
|
||||
// HQ is still a Building (for belt integration).
|
||||
int hqCount = 0;
|
||||
for (const Building& b : sim.getBuildings().getAllBuildings())
|
||||
for (const Building& b : getAllBuildings(sim.getFactoryState()))
|
||||
{
|
||||
if (b.type == BuildingType::Hq) { ++hqCount; }
|
||||
}
|
||||
@@ -143,7 +144,7 @@ TEST_CASE("WaveSystem: HQ anchor is at asteroid right edge", "[wave]")
|
||||
{
|
||||
const Simulation sim(loadTestConfig(), 42);
|
||||
|
||||
for (const Building& b : sim.getBuildings().getAllBuildings())
|
||||
for (const Building& b : getAllBuildings(sim.getFactoryState()))
|
||||
{
|
||||
if (b.type != BuildingType::Hq) { continue; }
|
||||
// Rightmost body cell must be at x = -1 (asteroid right edge).
|
||||
|
||||
Reference in New Issue
Block a user