Player12
An open source football management simulator
Loading...
Searching...
No Matches
competition_view.h File Reference
#include <array>
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
#include "global/types.h"
#include "gui/widgets/widgets.h"
#include "model/gamedate.h"

Go to the source code of this file.

Classes

struct  CompetitionView::StandingRow
 One row of a league table. More...
 
struct  CompetitionView::FixtureRow
 One scheduled or played match. More...
 
struct  CompetitionView::Zones
 Number of promotion and relegation places in a league table. More...
 

Namespaces

namespace  CompetitionView
 Read-only view models for league tables and fixture lists.
 

Functions

std::vector< StandingRow > CompetitionView::buildStandings (const GameController &controller, LeagueID leagueId)
 League table for one league in the competitions model's order (points, goal difference, goals scored, head-to-head, name).
 
Zones CompetitionView::zonesFor (const GameController &controller, LeagueID leagueId)
 Promotion (top) and relegation (bottom) places of a league.
 
std::vector< FixtureRow > CompetitionView::buildLeagueFixtures (const GameController &controller, LeagueID leagueId)
 All league fixtures of a league in date order, with rounds.
 
std::vector< FixtureRow > CompetitionView::buildClubFixtures (const GameController &controller, TeamID teamId)
 Every fixture (all competitions) of one club in date order.
 
std::optional< FixtureRow > CompetitionView::nextFixture (const GameController &controller, TeamID teamId)
 The club's next unplayed fixture on or after the current date.
 
const char * CompetitionView::matchTypeKey (MatchType type)
 Localisation key naming a competition type.
 
UI::Outcome CompetitionView::outcomeFor (const FixtureRow &fixture, TeamID teamId)
 Outcome of a played fixture from one club's perspective.
 

Variables

constexpr size_t CompetitionView::FORM_LENGTH = 5