|
Player12
An open source football management simulator
|
Functions | |
| const char * | key (const MatchEvent &event) |
| std::string | fill (std::string_view pattern, const MatchEvent &event, const MatchCommentaryNames &names) |
| std::string | describe (const MatchEvent &event, const MatchCommentaryNames &names) |
Localised one-line commentary for structured match events. The engine only records what happened (type, side, players, score, detail); every word shown to the user comes from the MATCH_COMMENT_* language keys, so the presentation layer can re-describe events in the current language with the real team names.
| std::string MatchCommentary::describe | ( | const MatchEvent & | event, |
| const MatchCommentaryNames & | names | ||
| ) |
The localised line for event: fill() of its key's translation.
| std::string MatchCommentary::fill | ( | std::string_view | pattern, |
| const MatchEvent & | event, | ||
| const MatchCommentaryNames & | names | ||
| ) |
Fills {team}, {player}, {other}, {home}, {away}, {homeScore}, {awayScore}, {minutes}, {homePens} and {awayPens} of pattern from event and names.
| const char * MatchCommentary::key | ( | const MatchEvent & | event | ) |
Language key of the line for event (e.g. "MATCH_COMMENT_CORNER").