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
+2
-2
@@ -35,7 +35,7 @@ int main(int argc, char** argv) {
|
||||
const uint16_t lineup = LINEUP_ONLY | ALL_POSITIONS;
|
||||
std::printf("%-22s %3s %3s %3s %3s | %4s %4s %4s | %3s\n", "team", "K", "T", "F", "M", "KT", "KTF", "KTFM", "n");
|
||||
int first = league_first_team(league);
|
||||
for (int t = first; t < first + kLeagueSizes[league]; t++) {
|
||||
for (int t = first; t < first + league_system().sizes[league]; t++) {
|
||||
TeamAverage k = team_average(g, t, lineup | CONDITION);
|
||||
std::printf("%-22s %3d %3d %3d %3d | %4d %4d %4d | %3d\n", name(t).c_str(), k.value,
|
||||
team_average(g, t, lineup | TECHNIQUE).value, team_average(g, t, lineup | FORM).value,
|
||||
@@ -45,7 +45,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
std::printf("\nside ratings (legacy routine, computer teams): goal def mid att p4 p5, formation\n");
|
||||
for (int t = first; t < first + kLeagueSizes[league]; t++) {
|
||||
for (int t = first; t < first + league_system().sizes[league]; t++) {
|
||||
if (g.manager_of(t) >= 0) {
|
||||
std::printf("%-22s (human manager)\n", name(t).c_str());
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user