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

dmn::GameToX Class Reference

Game module to X points. More...

#include <toX.h>

Inheritance diagram for dmn::GameToX:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GameToX (Points max_points)
 Constructor.

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

bool next_hand (ID hand, std::list< ID > *players)
 Players for the next hand.

bool is_first_hand (ID hand)
 Check if the identificator is the first hand of this game.

void set_hand_winner (ID hand, ID couple, Points points)
 Notify the winner of a hand.

Points points_to_win ()
 Returns the points that a player/couple must to do to win the game.

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

ID next_turn ()
 Player who starts the hand.

ID winner ()
 Winner of the game.

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


Detailed Description

Game module to X points.


Constructor & Destructor Documentation

dmn::GameToX::GameToX Points  max_points  ) 
 

Constructor.

Parameters:
max_points points needed to win the game


Member Function Documentation

bool dmn::GameToX::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::Game.

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

Check if the game is finished or not.

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

Implements dmn::Game.

bool dmn::GameToX::is_first_hand ID  hand  )  [virtual]
 

Check if the identificator is the first hand of this game.

Parameters:
hand identificator of the hand
Returns:
true if hand is the first hand of the game, else false

Implements dmn::Game.

bool dmn::GameToX::next_hand ID  hand,
std::list< ID > *  players
[virtual]
 

Players for the next hand.

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

Implements dmn::Game.

ID dmn::GameToX::next_turn  )  [virtual]
 

Player who starts the hand.

Returns:
players who plays or ID_NULL if game is finished

Implements dmn::Game.

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

Returns the points that a player/couple must to do to win the game.

Returns:
the points

Implements dmn::Game.

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

Score board of the game.

Parameters:
score where the score board is returned (gamescore_t)

Implements dmn::Game.

void dmn::GameToX::set_hand_winner ID  hand,
ID  couple,
Points  points
[virtual]
 

Notify the winner of a hand.

Parameters:
hand identificator of the hand
couple identificator of the couple winner
points pointes for the winner

Implements dmn::Game.

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

Winner of the game.

Returns:
couple winner

Implements dmn::Game.


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