Mari's Tarot
 All Classes Files Functions Variables Enumerations Enumerator Friends
Public Member Functions | List of all members
Human Class Reference

Human is the class implementing Human player actions, like playing a card. More...

#include <Human.hpp>

Inheritance diagram for Human:
Inheritance graph
Collaboration diagram for Human:
Collaboration graph

Public Member Functions

 Human (const string &name)
 The unique constructor of Human. More...
 
Biddings bid (const Biddings bestBid, const bool chelemAnnounced) const
 To let the Human player bids. More...
 
shared_ptr< CardchooseKing (const Deck &deck) const
 To make a choice for partnership in a 5-player game. More...
 
set< shared_ptr< Card > > makeEcart (const int dogSize)
 To let the Human player makes his/her ecart. More...
 
void newGame ()
 To get prepared for a new game. More...
 
shared_ptr< CardplayCard (const Suits referenceCard, const shared_ptr< Card > highTrump)
 To play a card, knowing the ask suit and the highest trump of the trick, if any. More...
 
- Public Member Functions inherited from Player
 Player (const string &name)
 The unique constructor of Player. More...
 
void addCard (const shared_ptr< Card > card)
 Add a card among player's initial cards. More...
 
vector< shared_ptr< Card > > getAllCards () const
 Returns the vector of all cards in player's hand. More...
 
set< AnnouncementsgetAnnounced () const
 Inline assessor to the set of announcements. More...
 
vector< shared_ptr< Card > > getInitialCards () const
 Inline assessor to the player's initial cards. More...
 
int getNumberOudlers () const
 Inline assessor to the number of oudlers the player has with his/her initial hand. More...
 
void showCards () const
 To print all player's cards in his/her current hand. More...
 
vector< shared_ptr< Card > > validCards (const Suits referenceSuit, const shared_ptr< Card > greaterTrump) const
 Returns the vector of cards the player can currently play, regarding the asked suit and the greater trump of the trick. More...
 

Additional Inherited Members

- Public Attributes inherited from Player
string name
 The player's name. More...
 
double score
 The player's score. More...
 
- Protected Member Functions inherited from Player
vector< shared_ptr< Card > > callableCards (const Deck &deck) const
 To compute the vector of cards we can call during a 5-player game. More...
 
void delCard (const shared_ptr< Card > card)
 To delete a card from the player's current hand. More...
 
- Protected Attributes inherited from Player
set< shared_ptr< Card >
, cardOrder
hearts
 The set of Hearts owned by the player. More...
 
set< shared_ptr< Card >
, cardOrder
spades
 The set of Spades owned by the player. More...
 
set< shared_ptr< Card >
, cardOrder
diamonds
 The set of Diamonds owned by the player. More...
 
set< shared_ptr< Card >
, cardOrder
clubs
 The set of Clubs owned by the player. More...
 
set< shared_ptr< Card >
, cardOrder
trumps
 The set of trumps owned by the player. More...
 
shared_ptr< Cardfool
 The pointer toward the Fool, if owned by the player. More...
 
vector< shared_ptr< Card > > initialCards
 The vector of player's initial cards, from his/her starting hand. More...
 
int numberOudlers
 The number of oudlers the player has among his/her initial cards. More...
 
double initialPoints
 The number of points the player has with his/her initial cards. More...
 
set< Announcementsannounced
 The set of announcements (for what?). More...
 

Detailed Description

Human is the class implementing Human player actions, like playing a card.

Constructor & Destructor Documentation

Human::Human ( const string &  name)

The unique constructor of Human.

Parameters
nameThe name of the Human player.

Member Function Documentation

Biddings Human::bid ( const Biddings  bestBid,
const bool  chelemAnnounced 
) const
virtual

To let the Human player bids.

Parameters
bestBidThe best bid proposed so far.
chelemAnnouncedTrue iff a chelem has been announced.
Returns
The Human player's bid.

Implements Player.

shared_ptr< Card > Human::chooseKing ( const Deck deck) const
virtual

To make a choice for partnership in a 5-player game.

Parameters
deckThe current deck used for the game
Returns
The chosen king (or card).

Implements Player.

set< shared_ptr< Card > > Human::makeEcart ( const int  dogSize)
virtual

To let the Human player makes his/her ecart.

Parameters
dogSizeThe number of cards to put into the ecart.

Implements Player.

void Human::newGame ( )
virtual

To get prepared for a new game.

Implements Player.

shared_ptr< Card > Human::playCard ( const Suits  referenceCard,
const shared_ptr< Card highTrump 
)
virtual

To play a card, knowing the ask suit and the highest trump of the trick, if any.

Parameters
referenceCardThe card fixing the ask suit for the trick.
highTrumpThe highest trump played so far for the trick, if any.
Returns
The card the player plays.

Implements Player.


The documentation for this class was generated from the following files: