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

dmn::TournamentCup Class Reference

Cup Tournament. More...

#include <cup.h>

Inheritance diagram for dmn::TournamentCup:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TournamentCup ()
 Constructor.

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

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

bool set_match_winner (ID match, ID couple_winner)
 Notify the winner of a match.

bool classification (std::list< ID > *teams)
 Classification of the tournament.

ID winner ()
 Winner of the tournament.

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


Detailed Description

Cup Tournament.

In a cup, all the teams play versus other team, the looser is removed, the winner continues.


Member Function Documentation

bool dmn::TournamentCup::classification std::list< ID > *  teams  )  [virtual]
 

Classification of the tournament.

Parameters:
teams where to return the team identificators in order (first to last)
Returns:
true if all was ok, else false

Implements dmn::Tournament.

bool dmn::TournamentCup::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::Tournament.

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

Check if the tournament is finished or not.

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

Implements dmn::Tournament.

bool dmn::TournamentCup::next_match ID  match,
std::list< ID > *  couples
[virtual]
 

Couples for the next match.

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

Implements dmn::Tournament.

bool dmn::TournamentCup::set_match_winner ID  match,
ID  couple_winner
[virtual]
 

Notify the winner of a match.

Parameters:
match identificator of the match
couple_winner identificator of the couple winner
Returns:
true if all was ok, else false

Implements dmn::Tournament.

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

Winner of the tournament.

Returns:
team winner's identificator of ID_NULL if there isn't a winner

Implements dmn::Tournament.


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