Modern UI contract: live matchdays with interventions

session.advance {live: true} runs the kickoff on its own thread and stops at
the minutes of a live match of a human manager (not at a voided one).
live.step plays on, live.substitute and live.tactics act as the original's
pitch and tactics screens during a match (open, change, close) on the
kickoff thread, live.finish plays the day to its end. Other commands answer
live_running meanwhile, read_live reports the minute and the live scores.
A missing contract decision rolls the whole live day back. Also: the
recording takes matches up to the day the kickoff ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 13:21:43 +01:00
1 parent 10a8f0b881
commit 822331f045
6 files changed
+386 -4

No files matched your search

+2 -2
View File
@@ -791,7 +791,7 @@ cli::Json live_fixture(const ModernState& g, uint32_t after_date, uint32_t until
for (const auto& s : seasons)
for (size_t i = 0; i < s.matches.size(); ++i) {
const AlmanacMatch& m = s.matches[i];
if (m.date < after_date || m.date >= until_date) continue; // played from the desk day on, before the next desk
if (m.date < after_date || m.date > until_date) continue; // played from the desk day on (only played matches are recorded)
((m.home_manager >= 0 || m.away_manager >= 0) && human.size() < 4 ? human : others).push_back({&s, i});
}
if (human.empty()) return O{{"ok", false}, {"error", "live_no_human_match"}};
@@ -891,7 +891,7 @@ cli::Json almanac_matches_between(const ModernState& g, uint32_t from_date, uint
A out;
for (const auto& s : seasons_of(g))
for (size_t i = 0; i < s.matches.size(); ++i)
if (s.matches[i].date >= from_date && s.matches[i].date < until_date) out.push_back(almanac_match(g, s, i));
if (s.matches[i].date >= from_date && s.matches[i].date <= until_date) out.push_back(almanac_match(g, s, i));
return out;
}