Player12
An open source football management simulator
Loading...
Searching...
No Matches
awards.cpp File Reference
#include "model/awards.h"
#include <algorithm>
#include <cmath>
#include <format>
#include <set>
#include <utility>
#include "database/gamedata.h"
#include "database/sqlite_rows.h"
#include "model/board.h"
#include "model/competition.h"
#include "model/inbox.h"
#include "model/match_report.h"
#include "model/player.h"
#include "model/team.h"

Namespaces

namespace  Awards
 Selection rules of the league honours.
 

Functions

const char * awardTypeKey (AwardType type)
 
float Awards::playerScore (const AwardPlayerTally &tally, bool goalkeeper)
 
std::optional< std::size_t > Awards::bestPlayer (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes, int max_age)
 
std::optional< std::size_t > Awards::goldenBoot (std::span< const AwardCandidate > candidates)
 
std::optional< std::size_t > Awards::goldenGlove (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes)
 
std::array< std::optional< std::size_t >, TEAM_OF_SEASON_SIZE > Awards::teamOfSeason (std::span< const AwardCandidate > candidates, std::uint16_t min_minutes)
 
const char * Awards::slotKey (std::uint8_t slot)
 
std::optional< std::size_t > Awards::bestManager (std::span< const AwardClubTally > clubs, std::uint16_t min_matches)
 
std::uint16_t Awards::seasonMinMinutes (std::span< const AwardCandidate > candidates)
 
float Awards::goalScore (std::uint8_t minute, int own_before, int other_before, bool decisive, int reputation_gap, bool assisted)
 
float Awards::valueMultiplier (std::span< const AwardRecord > honours, const GameDateValue &today)
 

Function Documentation

◆ awardTypeKey()

const char * awardTypeKey ( AwardType  type)

Language key naming type (e.g. "AWARD_PLAYER_OF_MONTH").