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

Comparison rules of the records book. More...

Functions

bool beats (const RecordEntry &challenger, const RecordEntry &holder)
 
bool isLegend (const ClubPlayerTotal &totals, int honours)
 
int legendScore (const ClubPlayerTotal &totals, int honours)
 

Variables

constexpr std::uint16_t LEGEND_APPEARANCES = 150
 
constexpr std::uint16_t LEGEND_GOALS = 60
 
constexpr std::uint16_t LEGEND_HONOURS_APPEARANCES = 60
 
constexpr int LEGEND_HONOURS = 2
 
constexpr std::size_t HALL_OF_FAME_SIZE = 12
 

Detailed Description

Comparison rules of the records book.

A challenger must strictly beat the holder: on a tie the earlier holder keeps the record. Biggest wins and defeats compare the margin, then the goals scored (conceded).

Function Documentation

◆ beats()

bool Records::beats ( const RecordEntry &  challenger,
const RecordEntry &  holder 
)

True when challenger takes the record from holder.

◆ isLegend()

bool Records::isLegend ( const ClubPlayerTotal &  totals,
int  honours 
)

Whether a club career qualifies for the hall of fame.

◆ legendScore()

int Records::legendScore ( const ClubPlayerTotal &  totals,
int  honours 
)

Ranking score of a legend: appearances + 2 x goals + 30 x honours.

Variable Documentation

◆ HALL_OF_FAME_SIZE

constexpr std::size_t Records::HALL_OF_FAME_SIZE = 12
inlineconstexpr

◆ LEGEND_APPEARANCES

constexpr std::uint16_t Records::LEGEND_APPEARANCES = 150
inlineconstexpr

◆ LEGEND_GOALS

constexpr std::uint16_t Records::LEGEND_GOALS = 60
inlineconstexpr

◆ LEGEND_HONOURS

constexpr int Records::LEGEND_HONOURS = 2
inlineconstexpr

◆ LEGEND_HONOURS_APPEARANCES

constexpr std::uint16_t Records::LEGEND_HONOURS_APPEARANCES = 60
inlineconstexpr