Show line-ups before kickoff, bind form and table widgets, rewrite the press wording
- Live ticker: the paused live state carries both starting elevens; the ticker lists them until the first report. A single match no longer gets an empty strip above the score, repeated status lines are gone, whistles carry no club badge, dates are written out. - Desk: "Die letzten Spiele" and the table place curve are fed by the engine (desktop-widgets read: recent, rankCurve) and belong to the default layout; the own crest widget is bound. - News: the German press templates are rewritten to one plain sentence each (the catalogue accepts a single sentence now); the reference snapshots follow, and the catalogue test can rewrite them with --update. Mailbox texts show world spellings of clubs and players and the euro sign. - Small type raised in advertising, lineup, news, toto, transfer and others; the transfer market column no longer runs under its scrollbar. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd20960f90
commit
9708b720b2
33 files changed
+418
-373
No files matched your search
@@ -1146,6 +1146,25 @@ cli::Json live_fixture(const ModernState& g, uint32_t after_date, uint32_t until
|
||||
// cards, the result, clean sheets), one goalkeeper, three defenders, four midfielders and
|
||||
// three forwards. Nothing is drawn at random and no rating of the original is used; the
|
||||
// current strength of a player only breaks ties.
|
||||
cli::Json recent_results(const ModernState& g, const std::string& club_id, size_t count) {
|
||||
A rows;
|
||||
for (const auto& s : seasons_of(g))
|
||||
for (const auto& m : s.matches) {
|
||||
if (m.home >= s.clubs.size() || m.away >= s.clubs.size()) continue;
|
||||
const bool home = s.clubs[m.home].id == club_id;
|
||||
if (!home && s.clubs[m.away].id != club_id) continue;
|
||||
const int own = home ? m.home_goals : m.away_goals, other = home ? m.away_goals : m.home_goals;
|
||||
int balance = own - other;
|
||||
if (!balance && m.decided == 2)
|
||||
balance = home ? int(m.home_shootout) - int(m.away_shootout) : int(m.away_shootout) - int(m.home_shootout);
|
||||
rows.push_back(O{{"form", balance > 0 ? "S" : balance < 0 ? "N" : "U"},
|
||||
{"score", std::to_string(own) + ":" + std::to_string(other)},
|
||||
{"opponent", s.clubs[home ? m.away : m.home].name}, {"home", home}});
|
||||
}
|
||||
if (rows.size() > count) rows.erase(rows.begin(), rows.end() - std::ptrdiff_t(count));
|
||||
return rows;
|
||||
}
|
||||
|
||||
cli::Json team_of_the_day(const ModernState& g, uint32_t from_date, uint32_t until_date) {
|
||||
std::map<std::string, int> runtime; // world player id -> runtime index
|
||||
for (size_t p = 0; p < g.world_player_id.size(); ++p)
|
||||
|
||||
Reference in new issue
Block a user