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

dmn::Player Class Reference

Player interface. More...

#include <player.h>

Inheritance diagram for dmn::Player:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Player ()
 Constructor.

virtual ~Player ()
 Destructor.

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

virtual void set_name (std::string name)=0
 Set the player's name.

virtual std::string name ()=0
 Player's name.

virtual bool is_interactive ()=0
 Check if the player is interactive or not.

virtual void set_shuffled_tile (Domino domino)=0
 Shuffle a tile to a player.

virtual bool domino_to_play (Domino *domino, HalfDomino *half)=0
 Domino played by the player (played by the module).

virtual void set_domino_played (ID id, Domino domino, HalfDomino half)=0
 Domino played by other player (no by the module).

virtual void set_player_pass (ID id, bool domino_shuffled)=0
 A player passes (haven't domino to play).


Detailed Description

Player interface.


Member Function Documentation

virtual bool dmn::Player::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::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual bool dmn::Player::domino_to_play Domino domino,
HalfDomino half
[pure virtual]
 

Domino played by the player (played by the module).

Parameters:
domino domino shuffled
half side of the domino
Returns:
true if the player pass or false if plays

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual bool dmn::Player::is_interactive  )  [pure virtual]
 

Check if the player is interactive or not.

Returns:
true if it's interative, else false

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual std::string dmn::Player::name  )  [pure virtual]
 

Player's name.

Returns:
the name

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual void dmn::Player::set_domino_played ID  id,
Domino  domino,
HalfDomino  half
[pure virtual]
 

Domino played by other player (no by the module).

Parameters:
id identificator of the player
domino domino shuffled
half side of the domino

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual void dmn::Player::set_name std::string  name  )  [pure virtual]
 

Set the player's name.

Parameters:
name player's name

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual void dmn::Player::set_player_pass ID  id,
bool  domino_shuffled
[pure virtual]
 

A player passes (haven't domino to play).

Parameters:
id identificator of the player
domino_shuffled true if a domino is shuffled to the player or false if not

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.

virtual void dmn::Player::set_shuffled_tile Domino  domino  )  [pure virtual]
 

Shuffle a tile to a player.

Parameters:
domino domino shuffled

Implemented in dmn::PlayerQt, dmn::PlayerStupid, and dmn::PlayerText.


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