Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

dmn::MatchToX Class Reference

Match module to X games. More...

#include <toX.h>

Inheritance diagram for dmn::MatchToX:

Inheritance graph
[legend]
Collaboration diagram for dmn::MatchToX:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MatchToX (Points max_games)
 Constructor.

bool configure (Core *core)
 Make all the configuration needed by the module (after have the id).

bool next_game (ID game, std::list< ID > *couples)
 Couples for the next game.

void set_game_winner (ID game, ID couple_winner)
 Notify the winner of a game.

Points points_to_win ()
 Returns the points that a team needs to do to win the match.

void score_board (std::list< Score > *score)
 Score board of the match.

ID winner ()
 Winner of the match.

bool is_finished ()
 Check if the match is finished or not.


Detailed Description

Match module to X games.


Constructor & Destructor Documentation

dmn::MatchToX::MatchToX Points  max_games  ) 
 

Constructor.

Parameters:
max_games games needed to win the match


Member Function Documentation

bool dmn::MatchToX::configure Core core  )  [virtual]
 

Make all the configuration needed by the module (after have the id).

Parameters:
core core module
Returns:
true if all was ok, else false

Implements dmn::Match.

bool dmn::MatchToX::is_finished  )  [virtual]
 

Check if the match is finished or not.

Returns:
true if the match is finished or false if not

Implements dmn::Match.

bool dmn::MatchToX::next_game ID  game,
std::list< ID > *  couples
[virtual]
 

Couples for the next game.

Parameters:
game identificator of the next game
couples where to put the list of couples
Returns:
true if all was ok, else false

Implements dmn::Match.

Points dmn::MatchToX::points_to_win  )  [virtual]
 

Returns the points that a team needs to do to win the match.

Returns:
the points

Implements dmn::Match.

void dmn::MatchToX::score_board std::list< Score > *  score  )  [virtual]
 

Score board of the match.

score must have space for the score board

Parameters:
score where the score board is returned

Implements dmn::Match.

void dmn::MatchToX::set_game_winner ID  game,
ID  couple_winner
[virtual]
 

Notify the winner of a game.

Parameters:
game identificator of the game
couple_winner identificator of the couple winner

Implements dmn::Match.

ID dmn::MatchToX::winner  )  [virtual]
 

Winner of the match.

Returns:
couple winner's identificator or ID_NULL if there isn't one

Implements dmn::Match.


The documentation for this class was generated from the following file:
Generated on Fri Dec 26 22:55:55 2003 for dmn by doxygen 1.3.4