|
Player12
An open source football management simulator
|
The world news feed: dated stories derived from saved data. More...
Functions | |
| std::vector< NewsItem > | build (const NewsSources &sources, const GameDateValue &from, const GameDateValue &to) |
| std::vector< NewsItem > | forGame (const Game &game, const GameData &gamedata) |
| std::vector< std::size_t > | filter (std::span< const NewsItem > items, const NewsFilter &filter) |
| std::size_t | variant (NewsKind kind, std::uint32_t first, std::uint32_t second, const GameDateValue &date, std::size_t count) |
Variables | |
| constexpr std::uint32_t | MAJOR_FEE = 12'000'000 |
| constexpr int | UPSET_REPUTATION_GAP = 18 |
| constexpr std::uint16_t | LEADER_MIN_PLAYED = 6 |
| constexpr int | RACE_GAMES_LEFT = 8 |
| constexpr int | RACE_POINTS_GAP = 3 |
The world news feed: dated stories derived from saved data.
Pure and deterministic: the same saved facts give the same stories in the same order (newest first), so the feed is identical after a reload. It never writes anything (no inbox messages, no saved state).
| std::vector< NewsItem > NewsFeed::build | ( | const NewsSources & | sources, |
| const GameDateValue & | from, | ||
| const GameDateValue & | to | ||
| ) |
Stories dated from from to to (inclusive), newest first.
| std::vector< std::size_t > NewsFeed::filter | ( | std::span< const NewsItem > | items, |
| const NewsFilter & | filter | ||
| ) |
Indices of the stories filter keeps, in feed order.
The feed of a running game: this season and the last one up to today, from every saved source (transfers, managers, inbox dismissal reports, awards, league records and the managed club's, season history and this season's fixtures).
| std::size_t NewsFeed::variant | ( | NewsKind | kind, |
| std::uint32_t | first, | ||
| std::uint32_t | second, | ||
| const GameDateValue & | date, | ||
| std::size_t | count | ||
| ) |
Headline variant for a story: a hash of its facts, never a random draw.
|
inlineconstexpr |
Matches a new league leader must have played to be news.
|
inlineconstexpr |
Fees from this amount make the world news (euros).
|
inlineconstexpr |
Title race: at most this many games left and points between the top two.
|
inlineconstexpr |
|
inlineconstexpr |
Reputation gap between loser and winner that makes a result an upset.