Modern UI contract: live table in the paused kickoff

live_league_table is shared by the recording and the paused live state;
a paused league match now reports its league with the running scores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 14:09:04 +01:00
1 parent eb5c5d6211
commit 6e400d708c
5 files changed
+92 -38

No files matched your search

+9
View File
@@ -12,6 +12,8 @@
// goals, assists, cards per player in one competition,
// of one season ("2026/27") or all seasons
#include <vector>
#include "cli/json.hpp"
#include "modern/game/modern_state.hpp"
@@ -42,6 +44,13 @@ cli::Json query_statistics_screen(const ModernState& g, int manager, const cli::
// day as the conference. source: "engine-recording".
cli::Json live_fixture(const ModernState& g, uint32_t after_date, uint32_t until_date, uint64_t revision);
// A game of a matchday under way: runtime teams and goals so far.
struct LiveGame { int home = 0, away = 0, home_goals = 0, away_goals = 0; };
// The live table of a league during matchday `round` (1-based): the table before it plus the
// given games. {competitionId, name, round, rows: [{rank, previousRank, team, played, won,
// drawn, lost, goalsFor, goalsAgainst, points}]}.
cli::Json live_league_table(const ModernState& g, int league, int round, const std::vector<LiveGame>& games);
// All recorded matches with from_date <= date < until_date in the almanac form (the matches of a kickoff).
cli::Json almanac_matches_between(const ModernState& g, uint32_t from_date, uint32_t until_date);