|
Player12
An open source football management simulator
|
Typedefs | |
| using | Eligibility = std::function< bool(const Player &)> |
Functions | |
| std::vector< PlayerID > | ineligible (const Lineup &lineup, const Eligibility &eligible) |
| float | slotScore (const Player &player, PlayerRole slot, const StatsConfig &config) |
| std::size_t | replaceIneligible (Lineup &lineup, std::span< const Player *const > squad, const Eligibility &eligible, const StatsConfig &config) |
| std::size_t | recallRegulars (Lineup &lineup, std::span< const Player *const > squad, const Eligibility &eligible, const StatsConfig &config) |
| void | recordStandIns (const Lineup &before, Lineup &after) |
| std::vector< std::pair< PlayerID, PlayerID > > | replacements (const Lineup &before, const Lineup &after) |
| void | carryCondition (MatchEngine &engine, const Lineup &lineup) |
| std::vector< PlayerMatchConsequence > | consequences (const MatchEngine &engine) |
| std::vector< std::pair< PlayerID, std::uint8_t > > | medicalFlags (const MedicalDesk &medical, const Lineup &lineup) |
Selection rules shared by live and simulated matches: who may take part, how an ineligible selection is replaced, and how the players' persistent physical state enters and leaves the match engine.
|
private |
|
private |
Starts the matchday squad (starters and substitutes) with its persistent condition (0-100).
|
private |
Minutes, end condition (0-100) and injuries of every participant.
|
private |
Selected players (goalkeeper, outfield, then reserves) who may not play.
|
private |
Medical staff instructions set for the matchday squad (starters and substitutes), for MatchEngine::setMedicalFlags.
|
private |
Puts the regulars of Lineup::getStandIns() who may play again back in place of their stand-ins: from the bench the two swap, from outside the matchday squad the regular takes the stand-in's place. While a regular is still out, an eligible player who fills the slot clearly better (slotScore) replaces his stand-in. Entries whose regular already starts, whose stand-in no longer does or whose regular is not in squad are dropped. Returns the number of regulars recalled.
Notes in after the starters who replaced a starter of before, slot by slot. A stand-in replaced in turn hands his entry on, so the regular is the one who returns.
|
private |
Replaces ineligible starters with the eligible substitute or unselected squad player who fits the slot best (slotScore; a keeper for the goalkeeper slot, an outfield player only when no keeper is left) and ineligible reserves with the best remaining squad players. Returns the number of players replaced.
|
private |
Who replaced whom between two selections of the same team: starters slot by slot, then reserves that left the squad (replacement 0).
|
private |
How well player fills a slot asking for slot: his overall scaled by the fit of his position (1 for his own, less for neighbouring ones).