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:
1 parent
74d6cde914
commit
cb6d3b6035
38 files changed
+232
-180
No files matched your search
@@ -124,7 +124,7 @@ int g_league_goals = 0, g_league_matches = 0;
|
||||
void print_first_league_results(const GameState& g, const char* checkpoint) {
|
||||
int goals = 0, matches = 0;
|
||||
for (int round = 1; round <= league_matchdays(0); ++round)
|
||||
for (int match = 0; match < kLeagueSizes[0] / 2; ++match) {
|
||||
for (int match = 0; match < league_system().sizes[0] / 2; ++match) {
|
||||
const Result r = decode_result(g.results.at(result_index(0, round, match)));
|
||||
if (!r.played) continue;
|
||||
goals += r.home_goals + r.away_goals;
|
||||
|
||||
Reference in new issue
Block a user