65 std::vector<PlayerMatchConsequence>* consequences =
nullptr);
127 std::optional<std::pair<uint8_t, uint8_t>>
penalties);
205 std::span<const Player* const> squad,
245std::vector<std::pair<PlayerID, std::uint8_t>>
medicalFlags(
Singleton class that acts as an in-memory cache for the database state.
Definition gamedata.h:43
Manages the starting XI and reserves of a team.
Definition lineup.h:85
Definition match_engine.h:517
Represents a football match between two teams.
Definition match.h:38
void setCompetitionId(LeagueID id)
Definition match.h:141
MatchReport applySimulation(MatchSimulationResult result)
Definition match.cpp:110
uint16_t getKickoff() const
Definition match.cpp:47
bool isPlayed() const
Checks if the match has been played.
Definition match.cpp:185
const GameDateValue & getDate() const
Gets the date of the match.
Definition match.cpp:183
std::optional< TeamID > getWinnerId() const
Definition match.cpp:139
void setKickoff(uint16_t minutes)
Definition match.h:136
uint8_t away_penalties
Definition match.h:171
void writeResultTo(MatchReport &report) const
Definition match.cpp:149
uint8_t getAwayScore() const
Gets the away team's score.
Definition match.cpp:181
uint8_t stage
Definition match.h:168
LeagueID competition_id
Definition match.h:167
uint8_t getStage() const
Definition match.h:142
uint8_t getHomePenalties() const
Definition match.h:148
uint8_t getHomeScore() const
Gets the home team's score.
Definition match.cpp:180
TeamID home_team_id
Definition match.h:161
uint8_t home_score
Definition match.h:165
LeagueID getCompetitionId() const
Definition match.h:140
uint32_t getSeed() const
Definition match.cpp:39
void setPlayedResult(uint8_t h, uint8_t a)
Definition match.cpp:121
std::optional< MatchSimulationInput > prepareSimulation(const GameData &game_data) const
Definition match.cpp:83
bool penalties
Definition match.h:173
TeamID away_team_id
Definition match.h:162
uint16_t getScheduledKickoff() const
Definition match.h:138
TeamID getAwayTeamId() const
Gets the ID of the away team.
Definition match.cpp:179
bool isKnockout() const
Definition match.h:145
uint16_t kickoff
Definition match.h:169
MatchType getMatchType() const
Gets the type of the match.
Definition match.cpp:182
uint8_t away_score
Definition match.h:166
TeamID getHomeTeamId() const
Gets the ID of the home team.
Definition match.cpp:178
void simulate(const GameData &game_data, MatchReport *report=nullptr, std::vector< PlayerMatchConsequence > *consequences=nullptr)
Simulates the match using the provided game data.
Definition match.cpp:70
bool extra_time
Definition match.h:172
bool wentToExtraTime() const
Definition match.h:146
void setKnockoutResult(uint8_t h, uint8_t a, bool extra_time, std::optional< std::pair< uint8_t, uint8_t > > penalties)
Definition match.cpp:128
uint8_t home_penalties
Definition match.h:170
MatchType match_type
Definition match.h:164
bool wentToPenalties() const
Definition match.h:147
GameDateValue match_date
Definition match.h:163
uint8_t getAwayPenalties() const
Definition match.h:149
bool _played
Definition match.h:174
The medical staff's day-to-day work for the managed club: rest and minute-limit instructions,...
Definition medical_centre.h:200
Persistent career identity, attributes, traits and day-to-day state.
Definition player.h:104
std::size_t recallRegulars(Lineup &lineup, std::span< const Player *const > squad, const Eligibility &eligible, const StatsConfig &config)
Definition match.cpp:432
void recordStandIns(const Lineup &before, Lineup &after)
Definition match.cpp:473
std::function< bool(const Player &)> Eligibility
Definition match.h:184
std::vector< PlayerID > ineligible(const Lineup &lineup, const Eligibility &eligible)
Definition match.cpp:275
std::vector< std::pair< PlayerID, PlayerID > > replacements(const Lineup &before, const Lineup &after)
Definition match.cpp:497
std::vector< PlayerMatchConsequence > consequences(const MatchEngine &engine)
Definition match.cpp:554
void carryCondition(MatchEngine &engine, const Lineup &lineup)
Definition match.cpp:539
std::vector< std::pair< PlayerID, std::uint8_t > > medicalFlags(const MedicalDesk &medical, const Lineup &lineup)
Definition match.cpp:523
std::size_t replaceIneligible(Lineup &lineup, std::span< const Player *const > squad, const Eligibility &eligible, const StatsConfig &config)
Definition match.cpp:290
float slotScore(const Player &player, PlayerRole slot, const StatsConfig &config)
Definition match.cpp:268
Contains structures to simplify JSON parsing and loading of player statistics.
Represents a specific date in the game world.
Definition gamedate.h:20
Structured summary of a played fixture, persisted per fixture.
Definition match_report.h:93
Definition match_scheduler.h:72
Physical outcome of one player's match.
Definition world_simulation.h:58
Configuration mapping roles to their focus areas and listing all possible stats.
Definition stats_config.h:42
MatchType
Represents the type or category of a match.
Definition types.h:40
uint8_t LeagueID
Type alias for League identifiers.
Definition types.h:15
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18
PlayerRole
Represents a specific tactical role on the pitch.
Definition types.h:63