Player12
An open source football management simulator
Loading...
Searching...
No Matches
continental.h File Reference
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "global/types.h"
#include "model/gamedate.h"
#include "model/inbox.h"
#include "model/standings.h"

Go to the source code of this file.

Classes

struct  Continental::Prizes
 
struct  Continental::CompetitionRules
 
struct  Continental::DrawTeam
 
struct  Continental::LeagueFixture
 
class  ContinentalCompetitions
 Seasons, draws, knockouts, prize money and coefficients of the continental club competitions. More...
 
struct  ContinentalCompetitions::Entrant
 
struct  ContinentalCompetitions::Tie
 
struct  ContinentalCompetitions::DrawEvent
 
struct  ContinentalCompetitions::Season
 
struct  ContinentalCompetitions::AssociationCoefficient
 
struct  ContinentalCompetitions::TieScore
 

Namespaces

namespace  Continental
 Continental club competitions: rules, draws and tables.
 

Enumerations

enum class  Continental::Continent : uint8_t { Continental::Europe , Continental::Americas }
 
enum class  Continental::Round : uint8_t {
  Continental::LeaguePhase = 0 , Continental::Playoff , Continental::RoundOf16 , Continental::QuarterFinal ,
  Continental::SemiFinal , Continental::Final
}
 

Functions

const CompetitionRules * Continental::rules (LeagueID competition_id)
 
std::optional< Continent > Continental::continentOf (LeagueID league_id)
 
uint8_t Continental::directPlaces (uint8_t clubs)
 
uint8_t Continental::playoffPlaces (uint8_t clubs)
 
Round Continental::firstKnockoutRound (uint8_t clubs)
 
uint8_t Continental::stageCode (Round round, uint8_t leg)
 
Round Continental::roundOf (uint8_t stage)
 
uint8_t Continental::legOf (uint8_t stage)
 
const char * Continental::roundKey (Round round)
 
std::vector< uint8_t > Continental::allocatePlaces (const CompetitionRules &rules, size_t associations, const std::vector< uint8_t > &capacity)
 League-phase places per association rank.
 
std::vector< LeagueFixture > Continental::drawLeaguePhase (const std::vector< DrawTeam > &teams, uint8_t pots, uint32_t seed)
 Seeded Swiss-model draw.
 
std::vector< StandingRow > Continental::leaguePhaseTable (const std::vector< TeamID > &entrants, const std::vector< const Match * > &matches, const std::function< double(TeamID)> &coefficient)
 League-phase table: points, goal difference, goals scored, away goals scored, wins, away wins, then coefficient and team ID.
 

Variables

constexpr LeagueID Continental::CHAMPIONS_CUP_ID = 250
 
constexpr LeagueID Continental::CONTINENTAL_SHIELD_ID = 251
 
constexpr LeagueID Continental::AMERICAS_CUP_ID = 252
 
constexpr std::array< CompetitionRules, 3 > Continental::COMPETITIONS
 
constexpr uint8_t Continental::KNOCKOUT_STAGE_BASE = 16