#include <array>
#include <cstdint>
#include <utility>
#include "gamedate.h"
Go to the source code of this file.
|
| constexpr uint8_t | toIndex (uint8_t row, uint8_t col) |
| | Converts a 2D grid position into a 1D index.
|
| |
| constexpr std::pair< int, int > | toRowCol (int i) |
| | Converts a 1D index into a 2D grid row/column pair.
|
| |
| const GameDateValue | START_DATE (2025, 7, 2) |
| | The starting date of the game.
|
| |
| const GameDateValue | START_SEASON_DATE (2025, 9, 1) |
| | The date when the season officially starts.
|
| |
◆ START_DATE()
The starting date of the game.
◆ START_SEASON_DATE()
The date when the season officially starts.
◆ toIndex()
| constexpr uint8_t toIndex |
( |
uint8_t |
row, |
|
|
uint8_t |
col |
|
) |
| |
|
constexpr |
Converts a 2D grid position into a 1D index.
- Parameters
-
| row | The row index. |
| col | The column index. |
- Returns
- The 1D index representing the position in the lineup grid.
◆ toRowCol()
| constexpr std::pair< int, int > toRowCol |
( |
int |
i | ) |
|
|
constexpr |
Converts a 1D index into a 2D grid row/column pair.
- Parameters
-
| i | The 1D index in the lineup grid. |
- Returns
- A pair containing the row and column indices.
◆ DAYS_PER_MONTH
| constexpr std::array<uint8_t, 12> DAYS_PER_MONTH |
|
constexpr |
Initial value:= {31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31}
Array mapping each month (0-11) to its number of days (ignoring leap years for simplicity).
◆ FREE_AGENTS_NAME_ARG
| constexpr const char* FREE_AGENTS_NAME_ARG = "@INBOX_FREE_AGENCY" |
|
constexpr |
The free agents in a message argument where a club name goes: a language key, so the reader sees it in their own language.
◆ FREE_AGENTS_TEAM_ID
| constexpr uint8_t FREE_AGENTS_TEAM_ID = 0 |
|
constexpr |
Team ID reserved for free agents.
◆ FREE_AGENTS_TEAM_NAME
| constexpr const char* FREE_AGENTS_TEAM_NAME = "Free agents" |
|
constexpr |
Internal name of the free agents team (never shown).
◆ LINEUP_GRID_COLS
| constexpr uint8_t LINEUP_GRID_COLS = 5 |
|
staticconstexpr |
◆ LINEUP_GRID_ROWS
| constexpr uint8_t LINEUP_GRID_ROWS = 5 |
|
staticconstexpr |
This is the size of the grid where to insert players it could be used to generate heatmaps where the actions take place during a match simulation. So that the local average stats of all players (attacker vs defenders) do make more of a difference during the game.
◆ LINEUP_GRID_SIZE
◆ MAX_STAT_VAL
| constexpr uint8_t MAX_STAT_VAL = 100 |
|
constexpr |
Maximum possible value for a player statistic.
◆ MIN_STAT_VAL
| constexpr uint8_t MIN_STAT_VAL = 1 |
|
constexpr |
Minimum possible value for a player statistic.
◆ PLAYER_AGE_FACTOR_DECAY_RATE
| constexpr float PLAYER_AGE_FACTOR_DECAY_RATE = 0.05f |
|
constexpr |
Rate at which the age factor decays for player development.
◆ PLAYER_AGE_FACTOR_DECLINE_AGE
| constexpr float PLAYER_AGE_FACTOR_DECLINE_AGE = 31.5f |
|
constexpr |
Age at which player performance starts to decline.
◆ PLAYER_RETIREMENT_AGE_THRESHOLD
| constexpr uint8_t PLAYER_RETIREMENT_AGE_THRESHOLD = 32 |
|
constexpr |
Minimum age at which a player might consider retirement.
◆ PLAYER_RETIREMENT_BASE_CHANCE
| constexpr float PLAYER_RETIREMENT_BASE_CHANCE = 0.01f |
|
constexpr |
Base probability of a player retiring.
◆ PLAYER_RETIREMENT_CHANCE_INCREASE_PER_YEAR
| constexpr float PLAYER_RETIREMENT_CHANCE_INCREASE_PER_YEAR = 0.05f |
|
constexpr |
Amount by which the retirement chance increases each year after the threshold.
◆ PLAYER_STAT_INCREASE_BASE
| constexpr float PLAYER_STAT_INCREASE_BASE = 0.03f |
|
constexpr |
Base rate at which player statistics increase.
◆ TEAMS_PER_LEAGUE
| constexpr uint8_t TEAMS_PER_LEAGUE = 16 |
|
constexpr |
Number of teams in each league.