|
Player12
An open source football management simulator
|
Classes | |
| struct | CountryRules |
| struct | MonthDay |
| struct | Period |
Functions | |
| std::span< const CountryRules > | countries () |
| const CountryRules & | rulesFor (LeagueID league) |
| bool | isOpen (LeagueID league, const GameDateValue &date) |
| bool | isOpenAnywhere (const GameDateValue &date) |
| bool | isStartOfYearWindow (LeagueID league, const GameDateValue &date) |
| std::optional< GameDateValue > | windowEnd (LeagueID league, const GameDateValue &date) |
| bool | isDeadlineDay (LeagueID league, const GameDateValue &date) |
| GameDateValue | nextOpening (LeagueID league, const GameDateValue &date) |
| bool | canSignFreeAgent (LeagueID league, const GameDateValue &date) |
Variables | |
| constexpr std::int16_t | FREE_AGENTS_ANY_TIME = -1 |
Registration periods (transfer windows) of each country.
A club can register a player from another club only while the window of its own league is open: the buying club's window decides, so a club whose window has shut can still sell abroad. Players without a club follow the country's free-agent rule. Every country has a mid-year window (the European summer) and a start-of-year window (January); both are fixed day-of-year ranges, the closing day (deadline day) included.
| bool TransferWindows::canSignFreeAgent | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
True when a club of league can sign a player without a club.
| std::span< const CountryRules > TransferWindows::countries | ( | ) |
Every country with its own rules (leagues.json ids).
| bool TransferWindows::isDeadlineDay | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
True on the last day of a window of league.
| bool TransferWindows::isOpen | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
True when clubs of league can sign players from other clubs.
| bool TransferWindows::isOpenAnywhere | ( | const GameDateValue & | date | ) |
True when the window of at least one country is open.
| bool TransferWindows::isStartOfYearWindow | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
True on a day of the start-of-year (January) window of league.
| GameDateValue TransferWindows::nextOpening | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
First day on or after date on which the window of league is open.
| const CountryRules & TransferWindows::rulesFor | ( | LeagueID | league | ) |
Rules of league's country; a common European calendar otherwise.
| std::optional< GameDateValue > TransferWindows::windowEnd | ( | LeagueID | league, |
| const GameDateValue & | date | ||
| ) |
Deadline day (last open day) of the window open on date; nullopt when the window of league is shut.
|
inlineconstexpr |
Free agents can join on any day of the year.