Almanac: record the matches of the German national team
The German national team shares its team number 357 with no_team, and the recorder skipped it as a placeholder, so no international match of Germany reached the almanac. Its line-up comes from the national squad while a human is the national coach, as in the match engine. modern_season_sim MODERN_ALMANAC_TEAM=<name> lists a team's recorded matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
85359a136f
commit
ddaebec183
5 files changed
+19
-7
No files matched your search
@@ -125,10 +125,17 @@ void print_almanac(const modern::ModernState& g) {
|
||||
}
|
||||
size_t matches = 0, events = 0, mismatched = 0, without_lineup = 0;
|
||||
std::map<std::string, std::pair<int, std::string>> scorers; // player id -> goals, name
|
||||
// MODERN_ALMANAC_TEAM=<name>: every recorded match of that team (type, date, score, line-up sizes)
|
||||
const char* watch_team = std::getenv("MODERN_ALMANAC_TEAM");
|
||||
for (const auto& s : seasons) {
|
||||
matches += s.matches.size();
|
||||
for (const auto& m : s.matches) {
|
||||
events += m.events.size();
|
||||
if (watch_team && (s.clubs[m.home].name == watch_team || s.clubs[m.away].name == watch_team))
|
||||
std::printf("almanac team match: season %d day %u type %d stage %d round %d: %s %d:%d %s, line-ups %zu/%zu, %zu events\n",
|
||||
s.start_year, m.date, int(m.type), int(m.stage), int(m.round), s.clubs[m.home].name.c_str(),
|
||||
int(m.home_goals), int(m.away_goals), s.clubs[m.away].name.c_str(), m.lineup[0].size(),
|
||||
m.lineup[1].size(), m.events.size());
|
||||
int goals[2] = {0, 0};
|
||||
for (const auto& e : m.events) {
|
||||
if (e.kind != modern::AlmanacEventKind::Goal) continue;
|
||||
|
||||
Reference in new issue
Block a user