#include <Formations.h>
Public Member Functions | |
FormationTypeInfo () | |
void | show (ostream &os=cout) |
bool | setFormationType (FormationT type) |
FormationT | getFormationType () const |
bool | setPosHome (VecPosition pos, int atIndex) |
bool | setXPosHome (double x, int atIndex) |
bool | setYPosHome (double y, int atIndex) |
VecPosition | getPosHome (int atIndex) const |
bool | setPlayerType (PlayerT type, int atIndex) |
PlayerT | getPlayerType (int atIndex) const |
bool | setPlayerTypeInfo (PlayerTypeInfo info, int atIndex) |
PlayerTypeInfo * | getPlayerTypeInfo (int atIndex) |
PlayerTypeInfo * | getPlayerTypeInfoOfPlayer (int iPlayerInFormation) |
Private Attributes | |
FormationT | formationType |
VecPosition | posHome [MAX_TEAMMATES] |
PlayerT | playerType [MAX_TEAMMATES] |
PlayerTypeInfo | playerTypeInfo [MAX_PLAYER_TYPES] |
Definition at line 138 of file Formations.h.
FormationTypeInfo::FormationTypeInfo | ( | ) |
This is the default constructor and does nothing.
Definition at line 256 of file Formations.cpp.
void FormationTypeInfo::show | ( | ostream & | os = cout |
) |
This method prints all the information about this formation to the specified output stream. The format is the following:
os | output stream for output. |
Definition at line 287 of file Formations.cpp.
References MAX_PLAYER_TYPES, MAX_TEAMMATES, playerType, playerTypeInfo, and posHome.
bool FormationTypeInfo::setFormationType | ( | FormationT | type | ) |
This method sets the current formation type for this class.
type | new formation type for this class. |
Definition at line 263 of file Formations.cpp.
References formationType.
FormationT FormationTypeInfo::getFormationType | ( | ) | const |
This method return the current formation type for this class.
Definition at line 271 of file Formations.cpp.
References formationType.
bool FormationTypeInfo::setPosHome | ( | VecPosition | pos, | |
int | atIndex | |||
) |
This method sets the home position of the role indicated by the number 'atIndex' in this formation. The home position is the position from which the strategic position is calculated and could be interpreted as the position a player is located when the ball is at the position (0,0).
pos | new home position for the player with role number 'atIndex' | |
atIndex | index of the player with role for which the home position should be set. |
Definition at line 349 of file Formations.cpp.
References posHome.
bool FormationTypeInfo::setXPosHome | ( | double | x, | |
int | atIndex | |||
) |
This method sets the x coordinate of the home position for the player with role number 'atIndex'.
x | x coordinate for the home position | |
atIndex | role in formation for which x coordinate should be set. |
Definition at line 360 of file Formations.cpp.
References posHome, and VecPosition::setX().
bool FormationTypeInfo::setYPosHome | ( | double | y, | |
int | atIndex | |||
) |
This method sets the y coordinate of the home position for the player with role number 'atIndex'.
y | y coordinate for the home position | |
atIndex | role number for which y coordinate should be set. |
Definition at line 371 of file Formations.cpp.
References posHome, and VecPosition::setY().
VecPosition FormationTypeInfo::getPosHome | ( | int | atIndex | ) | const |
This method returns the home position for the player with role number atIndex in this formation. The home position is the position from which the strategic position is calculated and could be interpreted as the position a player is located when the ball is at the position (0,0).
Definition at line 382 of file Formations.cpp.
References posHome.
Referenced by Formations::getStrategicPosition().
bool FormationTypeInfo::setPlayerType | ( | PlayerT | type, | |
int | atIndex | |||
) |
This method sets the player type for the player with role number 'atIndex' in this formation.
type | new player type for role at position 'atIndex' | |
atIndex | role number for which player type should be set. |
Definition at line 392 of file Formations.cpp.
References playerType.
PlayerT FormationTypeInfo::getPlayerType | ( | int | atIndex | ) | const |
This method returns the player type for the player with role number 'atIndex' in this formation.
Definition at line 401 of file Formations.cpp.
References playerType.
Referenced by Formations::getPlayerType().
bool FormationTypeInfo::setPlayerTypeInfo | ( | PlayerTypeInfo | info, | |
int | atIndex | |||
) |
This method sets the information for a player type in this formation. Note that information is for a player TYPE and not for a player ROLE.
info | new player type information for the player type at 'atIndex'. | |
atIndex | number of player type for which information should be set. |
Definition at line 411 of file Formations.cpp.
References playerTypeInfo.
PlayerTypeInfo * FormationTypeInfo::getPlayerTypeInfo | ( | int | atIndex | ) |
This method returns (a pointer to) the player type information for the player type at position 'atIndex'
atIndex | index of which player type information should be returned |
Definition at line 421 of file Formations.cpp.
References playerTypeInfo.
PlayerTypeInfo * FormationTypeInfo::getPlayerTypeInfoOfPlayer | ( | int | iPlayerInFormation | ) |
This method returns (a pointer to) the player type information for the player with role number 'iPlayerInFormation'.
iPlayerInFormation | role number for which info should be returned |
Definition at line 431 of file Formations.cpp.
References playerType, and playerTypeInfo.
FormationT FormationTypeInfo::formationType [private] |
type of this formation
Definition at line 140 of file Formations.h.
Referenced by getFormationType(), and setFormationType().
VecPosition FormationTypeInfo::posHome[MAX_TEAMMATES] [private] |
home position for roles
Definition at line 141 of file Formations.h.
Referenced by getPosHome(), setPosHome(), setXPosHome(), setYPosHome(), and show().
PlayerT FormationTypeInfo::playerType[MAX_TEAMMATES] [private] |
player_types for roles
Definition at line 142 of file Formations.h.
Referenced by getPlayerType(), getPlayerTypeInfoOfPlayer(), setPlayerType(), and show().
PlayerTypeInfo FormationTypeInfo::playerTypeInfo[MAX_PLAYER_TYPES] [private] |
info for roles
Definition at line 143 of file Formations.h.
Referenced by getPlayerTypeInfo(), getPlayerTypeInfoOfPlayer(), setPlayerTypeInfo(), and show().