Base class describing a BB match. More...
#include <Match.hh>
Public Member Functions | |
| virtual Team< T > * | getTeam (int team_id) |
| Return one of the competing teams. | |
| virtual Field< T > * | getField () |
| Return the field of the game. | |
| virtual Ball< T > * | getBall () |
| Return the ball of the game. | |
| virtual Weather * | getWeather () |
| Return the weather of the game. | |
| int | getHalf () const |
| int | getTurn () const |
| int | getActiveTeamId () const |
| Return the ID of the active team for the current turn. | |
| int | getBeginningTeamId () const |
| Return the ID of the team which begins the half-time. | |
| int | getReceivingTeamId () const |
| Return the ID of the team which receives the kick-off. | |
| int | getScoringTeamId () const |
| Return the ID of the last scoring team. | |
| enum eTurnOverMotive | getTurnoverMotive () const |
| Return the motive of the turnover. | |
| const Timer & | getTimer () const |
| Return the timer of the game. | |
Static Public Member Functions | |
| static const char * | tokenToString (unsigned token) |
| Stringifies rules defined packet tokens. | |
| static const char * | stringify (enum eTurnOverMotive motive) |
| Get a stringified version of enum eTurnOverMotive. | |
| static const char * | stringify (enum eError error) |
| Get a stringified version of enum eError. | |
| static const char * | stringifyGameState (int game_state) |
| Get a stringified version of game state. | |
| static const char * | stringifyPeriod (int period) |
| Get a stringified version of game period. | |
Protected Member Functions | |
| virtual void | printDebug (std::ostream &os) const |
Protected Attributes | |
| Team< T > * | team_ [2] |
| Competing teams. | |
| Field< T > * | field_ |
| Field of the clash. | |
| Ball< T > * | ball_ |
| Ball to be squeezed. | |
| Weather * | weather_ |
| Weather report. | |
| int | cur_half_ |
| ID of the current half-time, or 0 (before the game). | |
| int | cur_turn_ |
| ID of the current turn, or 0 (out of turns). | |
| int | active_team_id_ |
| ID of the active team for the current turn. | |
| int | beginning_team_id_ |
| ID of the team which begins the half-time. | |
| int | receiving_team_id_ |
| ID of the team which receives the kick-off. | |
| int | scoring_team_id_ |
| ID of the last scoring team. | |
| enum eTurnOverMotive | turnover_ |
| Turnover motive. | |
| Timer | timer_ |
| Turn timer. | |
Friends | |
| template<typename U > | |
| std::ostream & | operator<< (std::ostream &os, const Match< U > &m) |
Base class describing a BB match.
Return one of the competing teams.
| team_id | Team ID in the range [0, 1]. |
Reimplemented in SMatch, and CMatch.
References Match< T >::team_.
| const char * Match< T >::tokenToString | ( | unsigned | token | ) | [inline, static] |
Stringifies rules defined packet tokens.
References bb5_token_str.
1.6.3