League system: the league tables of the loaded game as one structure

The mutable globals of schedule.hpp (league sizes, calendar groups, promotion
ladder, European places, league suffixes, newcomers, English competitions) are
members of LeagueSystem in world_layout.hpp, read through league_system() and
written only by the installer of a game version. Values and uses are unchanged.
The size check of set_league_sizes asks the world layout for the league teams.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude committed 2026-11-10 22:13:40 +01:00
1 parent 74d6cde914
commit cb6d3b6035
38 files changed
+232 -180

No files matched your search

+1 -1
View File
@@ -504,7 +504,7 @@ int run(int argc, char** argv) {
}
for (const auto& t : final_tables) {
// (a league without calendar dates is not played: the English fifth league)
if (t.league_id >= 0 && t.league_id < bmh::kLeagueCount && bmh::kLeagueBit[size_t(t.league_id)] > 7) continue;
if (t.league_id >= 0 && t.league_id < bmh::kLeagueCount && bmh::league_system().calendar_bit[size_t(t.league_id)] > 7) continue;
for (const auto& r : t.rows)
if (r.games != 2 * (int(t.rows.size()) - 1))
fail("season " + std::to_string(season) + ": " + t.league_name + " " + r.name + " ended with " + std::to_string(r.games) + " games");