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

Functions

PlannerGroup groupOf (PlayerRole role)
 
const char * groupKey (PlannerGroup group)
 
int targetDepth (PlannerGroup group)
 
int defaultStarters (PlannerGroup group)
 
PlannerPlayer project (const PlannerPlayer &player, int seasons)
 
SquadPlan build (const std::vector< PlannerPlayer > &squad, int season_offset, const std::array< int, PLANNER_GROUP_COUNT > &starters={})
 

Function Documentation

◆ build()

SquadPlan SquadPlanner::build ( const std::vector< PlannerPlayer > &  squad,
int  season_offset,
const std::array< int, PLANNER_GROUP_COUNT > &  starters = {} 
)

Builds the plan of squad for the season season_offset seasons from now (0 = current). Later seasons drop players whose contract has run out and project the others. starters gives the XI's players per group (all zero: defaultStarters()).

◆ defaultStarters()

int SquadPlanner::defaultStarters ( PlannerGroup  group)

Starters of a typical back-four formation (1, 2, 1, 1, 3, 2, 1).

◆ groupKey()

const char * SquadPlanner::groupKey ( PlannerGroup  group)

Language key naming group (e.g. "PLANNER_GROUP_GOALKEEPERS").

◆ groupOf()

PlannerGroup SquadPlanner::groupOf ( PlayerRole  role)

Group of a playing role (UNKNOWN counts as midfield).

◆ project()

PlannerPlayer SquadPlanner::project ( const PlannerPlayer &  player,
int  seasons 
)

The player seasons seasons later: older, with a shorter contract and a projected overall that grows towards the potential estimate while young and declines from 30 (rates of WorldTuning::Development, an average playing time assumed). contract_years may reach 0 (left).

◆ targetDepth()

int SquadPlanner::targetDepth ( PlannerGroup  group)

Healthy squad depth per group (3 GK, 5 CB, 2+2 FB, 6 MID, 4 wide, 3 ST).