Player12
An open source football management simulator
Loading...
Searching...
No Matches
lineup.h File Reference
#include <array>
#include <span>
#include <string>
#include <utility>
#include <vector>
#include "global/global.h"
#include "global/types.h"
#include "player.h"
#include "strategy.h"

Go to the source code of this file.

Classes

class  Lineup
 Manages the starting XI and reserves of a team. More...
 
struct  Lineup::PositionedPlayer
 
struct  Lineup::StandIn
 A starter who was replaced because he could not play, and the player standing in for him until he can. More...
 

Namespaces

namespace  SetPieces
 Attribute-based suitability of players for set-piece duties.
 

Typedefs

using SetPieceDesignations = std::array< PlayerID, SET_PIECE_DUTY_COUNT >
 Player designated for each duty; 0 = chosen automatically.
 

Enumerations

enum class  SetPieceDuty : uint8_t {
  Captain , ViceCaptain , Penalties , FreeKicks ,
  CornersLeft , CornersRight , LongThrows , COUNT
}
 Leadership and dead-ball duties the manager can hand out (values are persisted in the lineup). More...
 

Functions

const char * SetPieces::dutyKey (SetPieceDuty duty)
 
bool SetPieces::isLeadership (SetPieceDuty duty)
 
float SetPieces::score (SetPieceDuty duty, const Player &player)
 
const Player * SetPieces::best (SetPieceDuty duty, const std::vector< const Player * > &candidates)
 

Variables

constexpr size_t SET_PIECE_DUTY_COUNT
 

Typedef Documentation

◆ SetPieceDesignations

Player designated for each duty; 0 = chosen automatically.

Enumeration Type Documentation

◆ SetPieceDuty

enum class SetPieceDuty : uint8_t
strong

Leadership and dead-ball duties the manager can hand out (values are persisted in the lineup).

Enumerator
Captain 
ViceCaptain 
Penalties 
FreeKicks 

Direct free kicks in shooting range.

CornersLeft 
CornersRight 
LongThrows 
COUNT 

Variable Documentation

◆ SET_PIECE_DUTY_COUNT

constexpr size_t SET_PIECE_DUTY_COUNT
inlineconstexpr
Initial value:
=
static_cast<size_t>(std::to_underlying(SetPieceDuty::COUNT))