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

dmn::Game Class Reference

Game interface. More...

#include <game.h>

Inheritance diagram for dmn::Game:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Game ()
 Constructor.

virtual ~Game ()
 Destructor.

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

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

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

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

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

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

virtual ID next_turn ()=0
 Player who starts the hand.

virtual ID winner ()=0
 Winner of the game.

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


Detailed Description

Game interface.


Member Function Documentation

virtual bool dmn::Game::configure Core core  )  [pure 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

Implemented in dmn::GameToX.

virtual bool dmn::Game::is_finished  )  [pure virtual]
 

Check if the game is finished or not.

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

Implemented in dmn::GameToX.

virtual bool dmn::Game::is_first_hand ID  hand  )  [pure 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

Implemented in dmn::GameToX.

virtual bool dmn::Game::next_hand ID  hand,
std::list< ID > *  players
[pure 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

Implemented in dmn::GameToX.

virtual ID dmn::Game::next_turn  )  [pure virtual]
 

Player who starts the hand.

Returns:
players who plays or ID_NULL if game is finished

Implemented in dmn::GameToX.

virtual Points dmn::Game::points_to_win  )  [pure virtual]
 

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

Returns:
the points

Implemented in dmn::GameToX.

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

Score board of the game.

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

Implemented in dmn::GameToX.

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

Notify the winner of a hand.

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

Implemented in dmn::GameToX.

virtual ID dmn::Game::winner  )  [pure virtual]
 

Winner of the game.

Returns:
couple winner

Implemented in dmn::GameToX.


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