Match< T > Class Template Reference
[Rules]

Base class describing a BB match. More...

#include <Match.hh>

List of all members.

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 WeathergetWeather ()
 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 TimergetTimer () 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.
Weatherweather_
 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)

Detailed Description

template<typename T>
class Match< T >

Base class describing a BB match.


Member Function Documentation

template<typename T >
Team< T > * Match< T >::getTeam ( int  team_id  )  [inline, virtual]

Return one of the competing teams.

Parameters:
team_id Team ID in the range [0, 1].

Reimplemented in SMatch, and CMatch.

References Match< T >::team_.

template<typename T >
const char * Match< T >::tokenToString ( unsigned  token  )  [inline, static]

Stringifies rules defined packet tokens.

See also:
BaseRules::stringifyToken(unsigned token)

References bb5_token_str.


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 21:17:34 2010 for Stechec/TBT by  doxygen 1.6.3