Player12
An open source football management simulator
Loading...
Searching...
No Matches
season_history.h File Reference
#include <cstdint>
#include <map>
#include <string>
#include <tuple>
#include <vector>
#include "global/types.h"

Go to the source code of this file.

Classes

struct  SeasonHistoryEntry
 Final outcome of one competition in one season. More...
 
struct  PlayerSeasonStats
 Competitive (league or cup) totals of a player for one team in one season. Friendlies are not counted. More...
 

Namespaces

namespace  SeasonStats
 

Typedefs

using PlayerSeasonKey = std::tuple< uint16_t, PlayerID, TeamID, MatchType >
 
using PlayerSeasonTable = std::map< PlayerSeasonKey, PlayerSeasonStats >
 

Functions

void SeasonStats::accumulate (PlayerSeasonTable &table, const MatchReport &report)
 Adds the player lines of a competitive match to the season table.
 
std::vector< PlayerSeasonStats > SeasonStats::topScorers (const PlayerSeasonTable &table, uint16_t season, MatchType competition_type, const std::vector< TeamID > &team_ids, size_t limit)
 

Typedef Documentation

◆ PlayerSeasonKey

using PlayerSeasonKey = std::tuple<uint16_t, PlayerID, TeamID, MatchType>

Key: season, player, team, competition type.

◆ PlayerSeasonTable