Player12
An open source football management simulator
Loading...
Searching...
No Matches
records.h File Reference
#include <cstddef>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "global/types.h"
#include "model/gamedate.h"

Go to the source code of this file.

Classes

struct  RecordEntry
 The current holder of one record. More...
 
struct  ClubPlayerTotal
 Competitive appearances and goals of a player for one club. More...
 
struct  AllTimeRow
 All-time league table row of a club (league matches only). More...
 
struct  LegendEntry
 A club legend in the hall of fame. More...
 
class  RecordBook
 Club and league records, club player totals, all-time tables and the hall of fame. More...
 
struct  RecordBook::SeasonTeam
 

Namespaces

namespace  Records
 Comparison rules of the records book.
 

Enumerations

enum class  RecordKind : std::uint8_t {
  BiggestWin = 0 , BiggestDefeat , HighestScoringMatch , HighestAttendance ,
  MostGoalsSeason , MostPointsSeason , TopScorerSeason , RecordSigning ,
  RecordSale , COUNT
}
 Kind of a record (values are persisted). More...
 
enum class  RecordScope : std::uint8_t { Club = 0 , League }
 Whether a record belongs to a club or to a league. More...
 

Functions

const char * recordKindKey (RecordKind kind)
 
bool Records::beats (const RecordEntry &challenger, const RecordEntry &holder)
 
bool Records::isLegend (const ClubPlayerTotal &totals, int honours)
 
int Records::legendScore (const ClubPlayerTotal &totals, int honours)
 

Variables

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

Enumeration Type Documentation

◆ RecordKind

enum class RecordKind : std::uint8_t
strong

Kind of a record (values are persisted).

Enumerator
BiggestWin 

value = margin, value2 = goals scored.

BiggestDefeat 

value = margin, value2 = goals conceded.

HighestScoringMatch 

value = total goals.

HighestAttendance 

value = crowd.

MostGoalsSeason 

value = league goals of a club in a season.

MostPointsSeason 

value = league points of a club in a season.

TopScorerSeason 

value = competitive goals of a player.

RecordSigning 

value = fee paid.

RecordSale 

value = fee received.

COUNT 

◆ RecordScope

enum class RecordScope : std::uint8_t
strong

Whether a record belongs to a club or to a league.

Enumerator
Club 
League 

Function Documentation

◆ recordKindKey()

const char * recordKindKey ( RecordKind  kind)

Language key naming kind (e.g. "RECORD_BIGGEST_WIN").