extract the production rules as free functions over config and building

This commit is contained in:
2026-08-05 06:49:15 +02:00
parent 58b94223f7
commit 9c3be0fbd0
7 changed files with 199 additions and 158 deletions

View File

@@ -1,5 +1,6 @@
#include "catch.hpp"
#include "FactoryQueries.h"
#include "ProductionRules.h"
#include <map>
#include <random>
@@ -1562,7 +1563,7 @@ TEST_CASE("BuildingSystem: getProductionStatus classifies production state", "[b
}
REQUIRE_FALSE(shipId.empty());
const auto statusOf = [&f](const Building& b) { return f.bs.getProductionStatus(b); };
const auto statusOf = [&f](const Building& b) { return getProductionStatus(f.cfg, b); };
SECTION("non-production buildings show no status light")
{