Team< T > Class Template Reference
[Rules]

Base class describing a BB team. More...

#include <Team.hh>

List of all members.

Public Member Functions

 Team (int team_id)
int getTeamId () const
int getNbPlayer () const
T * getPlayer (int id)
const std::string & getTeamName () const
const std::string & getNationName () const
std::string getNationId () const
const std::string & getCoachName () const
int getScore () const
int getReroll () const
int getRemainingReroll () const
bool canUseReroll () const
 Check if team has not used reroll during this turn, and if it has at least a remaining reroll.
void useReroll ()
void initReroll ()
int getActivePlayerId () const
bool hasDoneAction (enum eAction action) const
virtual void resetTurn ()
bool isPlacementValid () const
void incrementScore ()

Protected Member Functions

virtual void printDebug (std::ostream &os) const

Protected Attributes

int team_id_
 Team id (0 or 1).
T * player_ [MAX_PLAYER]
 List of this team players.
std::string team_name_
std::string nation_name_
std::string coach_name_
int score_
int reroll_
int reroll_remain_
int active_player_id_
bool actions_done_ [ACT_LAST]
bool reroll_used_

Friends

template<typename U >
std::ostream & operator<< (std::ostream &os, const Team< U > &t)

Detailed Description

template<typename T>
class Team< T >

Base class describing a BB team.


Member Function Documentation

template<typename T >
bool Team< T >::canUseReroll (  )  const [inline]

Check if team has not used reroll during this turn, and if it has at least a remaining reroll.

Note:
It doesn't check if it is team's turn (which is also required to use reroll) !

Referenced by Api::doReroll().


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