Complete Modern season preparation with persistent draw progress (by Codex)

This commit is contained in:
Codex committed 2026-10-26 11:10:25 +01:00
1 parent 967520190d
commit e81ecf95f2
27 files changed
+1432 -208

No files matched your search

+8 -2
View File
@@ -448,9 +448,15 @@ Json report_match_rows(const Catalog &world, const Json &state, bool other) {
}
return result;
}
Json report_opening_pairs(const Catalog &world) {
Json report_opening_pairs(const Catalog &world, const Json &flow) {
std::vector<const Json *> pool;
for (const auto *league : world.leagues("nation:de"))
if (!flow.is_null()) {
for (const auto &id : flow.at("order")) {
const auto *club = world.find("clubs", id.get<std::string>());
if (!club) throw editor::Error("unknown_demo_draw_club");
pool.push_back(club);
}
} else for (const auto *league : world.leagues("nation:de"))
for (const auto *club : world.clubs(league->at("id")))
if (pool.size() < 64)
pool.push_back(club);