|
| static std::string | toString (PlayerRole role) |
| | Converts a PlayerRole enum to its string representation.
|
| |
| static const char * | shortName (PlayerRole role) |
| | Localised short position name for display ("GK", "POR"). The codes of toString() are for persistence and parsing only.
|
| |
| static const char * | longName (PlayerRole role) |
| | Localised full position name ("Goalkeeper", "Portiere").
|
| |
| static std::string | shortNameArg (PlayerRole role) |
| | Inbox argument for the short name ("@ROLE_SHORT_GK"), so saved messages follow the current language.
|
| |
| static PlayerRole | fromString (std::string_view role_str) |
| | Converts a string to a PlayerRole enum.
|
| |
| static Vector2F | getBaseCoordinate (PlayerRole role) |
| | Gets the base pitch coordinate for a given role. Coordinates are normalized: X [0.0 (home goal) to 1.0 (away goal)], Y [0.0 (top) to 1.0 (bottom)].
|
| |
| static std::string | getBroadCategory (PlayerRole role) |
| | Gets the broad category of the role (e.g. "Striker", "Defender"). Used for backward compatibility with older stats logic.
|
| |
Utilities for handling player roles and their pitch mappings.