46 std::array<UI::Outcome, FORM_LENGTH>
form{};
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Read-only view models for league tables and fixture lists.
Definition competition_view.cpp:58
std::vector< FixtureRow > buildLeagueFixtures(const GameController &controller, LeagueID leagueId)
All league fixtures of a league in date order, with rounds.
Definition competition_view.cpp:122
constexpr size_t FORM_LENGTH
Definition competition_view.h:32
Zones zonesFor(const GameController &controller, LeagueID leagueId)
Promotion (top) and relegation (bottom) places of a league.
Definition competition_view.cpp:93
std::optional< FixtureRow > nextFixture(const GameController &controller, TeamID teamId)
The club's next unplayed fixture on or after the current date.
Definition competition_view.cpp:152
std::vector< FixtureRow > buildClubFixtures(const GameController &controller, TeamID teamId)
Every fixture (all competitions) of one club in date order.
Definition competition_view.cpp:138
const char * matchTypeKey(MatchType type)
Localisation key naming a competition type.
Definition competition_view.cpp:171
std::vector< StandingRow > buildStandings(const GameController &controller, LeagueID leagueId)
League table for one league in the competitions model's order (points, goal difference,...
Definition competition_view.cpp:60
UI::Outcome outcomeFor(const FixtureRow &fixture, TeamID teamId)
Outcome of a played fixture from one club's perspective.
Definition competition_view.cpp:188
Outcome
Match outcome for form strips.
Definition widgets.h:87
One scheduled or played match.
Definition competition_view.h:54
uint8_t away_score
Definition competition_view.h:63
bool played
Definition competition_view.h:61
std::string away_name
Definition competition_view.h:59
TeamID away_id
Definition competition_view.h:57
uint16_t kickoff
Definition competition_view.h:65
MatchType type
Definition competition_view.h:60
uint8_t home_score
Definition competition_view.h:62
int round
Definition competition_view.h:64
GameDateValue date
Definition competition_view.h:55
TeamID home_id
Definition competition_view.h:56
std::string home_name
Definition competition_view.h:58
One row of a league table.
Definition competition_view.h:36
int goals_for
Definition competition_view.h:43
int won
Definition competition_view.h:40
int drawn
Definition competition_view.h:41
std::string name
Definition competition_view.h:38
int goalDifference() const
Definition competition_view.h:49
int lost
Definition competition_view.h:42
int goals_against
Definition competition_view.h:44
uint8_t form_count
Definition competition_view.h:47
std::array< UI::Outcome, FORM_LENGTH > form
Definition competition_view.h:46
int played
Definition competition_view.h:39
int points
Definition competition_view.h:45
TeamID team_id
Definition competition_view.h:37
Number of promotion and relegation places in a league table.
Definition competition_view.h:70
size_t promotion
Definition competition_view.h:71
size_t relegation
Definition competition_view.h:72
Represents a specific date in the game world.
Definition gamedate.h:20
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