Complete Modern season preparation with persistent draw progress (by Codex)
This commit is contained in:
1 parent
967520190d
commit
e81ecf95f2
27 files changed
+1432
-208
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user