Player12
An open source football management simulator
Loading...
Searching...
No Matches
DrawCeremonies Namespace Reference

Builds draw ceremonies from draws already made. More...

Functions

std::optional< DrawCeremony > cupRound (const Calendar &calendar, const GameData &gamedata, LeagueID root, std::uint8_t stage, TeamID focus_team)
 
std::optional< DrawCeremony > latestCupRound (const Calendar &calendar, const GameData &gamedata, LeagueID root, const GameDateValue &today, TeamID focus_team)
 
std::optional< DrawCeremony > continentalRound (const ContinentalCompetitions &continental, const Calendar &calendar, LeagueID competition_id, std::uint16_t season_year, Continental::Round round, TeamID focus_team)
 
std::optional< DrawCeremony > latestContinentalRound (const ContinentalCompetitions &continental, const Calendar &calendar, LeagueID competition_id, const GameDateValue &today, TeamID focus_team)
 
bool announcesDraw (const InboxMessage &message)
 
std::optional< DrawCeremony > forMessage (const InboxMessage &message, const ContinentalCompetitions &continental, const Calendar &calendar, TeamID focus_team)
 
std::size_t shownAt (float elapsed, float speed, std::size_t total, bool reduced_motion)
 

Variables

constexpr float REVEAL_SECONDS = 0.9f
 

Detailed Description

Builds draw ceremonies from draws already made.

Domestic cup ties are revealed in a seeded order that depends only on the season, the cup and the round (the calendar does not keep the order the balls came out); continental knockout ties follow the stored draw order; a league-phase draw reveals one club's opponents pot by pot, home first.

Function Documentation

◆ announcesDraw()

bool DrawCeremonies::announcesDraw ( const InboxMessage &  message)

Whether a message announces a draw a ceremony can show.

◆ continentalRound()

std::optional< DrawCeremony > DrawCeremonies::continentalRound ( const ContinentalCompetitions &  continental,
const Calendar &  calendar,
LeagueID  competition_id,
std::uint16_t  season_year,
Continental::Round  round,
TeamID  focus_team 
)

A continental draw of the season of season_year. For the league phase, focus_team picks whose opponents are revealed (the top seed when it is not an entrant).

◆ cupRound()

std::optional< DrawCeremony > DrawCeremonies::cupRound ( const Calendar &  calendar,
const GameData &  gamedata,
LeagueID  root,
std::uint8_t  stage,
TeamID  focus_team 
)

A drawn round of the cup of root (nullopt before its draw).

◆ forMessage()

std::optional< DrawCeremony > DrawCeremonies::forMessage ( const InboxMessage &  message,
const ContinentalCompetitions &  continental,
const Calendar &  calendar,
TeamID  focus_team 
)

The draw a continental draw message announces (made on the message's day), or nullopt when it can no longer be found.

◆ latestContinentalRound()

std::optional< DrawCeremony > DrawCeremonies::latestContinentalRound ( const ContinentalCompetitions &  continental,
const Calendar &  calendar,
LeagueID  competition_id,
const GameDateValue &  today,
TeamID  focus_team 
)

The latest continental draw made on or before today, if any.

◆ latestCupRound()

std::optional< DrawCeremony > DrawCeremonies::latestCupRound ( const Calendar &  calendar,
const GameData &  gamedata,
LeagueID  root,
const GameDateValue &  today,
TeamID  focus_team 
)

The latest round of the cup of root drawn on or before today.

◆ shownAt()

std::size_t DrawCeremonies::shownAt ( float  elapsed,
float  speed,
std::size_t  total,
bool  reduced_motion 
)

Reveals shown elapsed seconds into a ceremony of total reveals at speed (1 = normal). Reduced motion shows everything at once.

Variable Documentation

◆ REVEAL_SECONDS

constexpr float DrawCeremonies::REVEAL_SECONDS = 0.9f
inlineconstexpr

Seconds between two reveals at normal speed.