43 Player(
const string& name );
49 void addCard(
const shared_ptr<Card> card );
57 virtual Biddings bid(
const Biddings bestBid,
const bool chelemAnnounced )
const = 0;
64 virtual shared_ptr<Card> chooseKing(
const Deck &deck )
const = 0;
70 vector< shared_ptr<Card> > getAllCards()
const;
73 inline set< Announcements >
getAnnounced()
const {
return announced; }
76 inline vector< shared_ptr<Card> >
getInitialCards()
const {
return initialCards; }
86 virtual set< shared_ptr<Card> > makeEcart(
const int dogSize ) = 0;
89 virtual void newGame() = 0;
97 virtual shared_ptr<Card> playCard(
const Suits referenceSuit,
const shared_ptr<Card> highTrump ) = 0;
100 void showCards()
const;
108 vector< shared_ptr<Card> > validCards (
const Suits referenceSuit,
const shared_ptr<Card> greaterTrump )
const;
119 vector< shared_ptr<Card> > callableCards(
const Deck &deck )
const;
125 void delCard(
const shared_ptr<Card> card );
129 bool operator() (
const shared_ptr<Card> lhs,
const shared_ptr<Card> rhs)
const
131 return lhs->getValue() < rhs->getValue();
147 bool hasCard(
const shared_ptr<Card> card )
const;
set< shared_ptr< Card >, cardOrder > trumps
The set of trumps owned by the player.
Definition: Player.hpp:139
double initialPoints
The number of points the player has with his/her initial cards.
Definition: Player.hpp:143
set< shared_ptr< Card >, cardOrder > hearts
The set of Hearts owned by the player.
Definition: Player.hpp:135
Suits
The enum containing all suits, plus the Fool as a special suit.
Definition: Suits.hpp:25
double score
The player's score.
Definition: Player.hpp:111
Deck is the class managing the deck of cards. Used as well as for the game deck, but also for a count...
Definition: Deck.hpp:32
set< Announcements > getAnnounced() const
Inline assessor to the set of announcements.
Definition: Player.hpp:73
set< shared_ptr< Card >, cardOrder > spades
The set of Spades owned by the player.
Definition: Player.hpp:136
Biddings
The enum containing all official biddings.
Definition: Biddings.hpp:35
set< shared_ptr< Card >, cardOrder > clubs
The set of Clubs owned by the player.
Definition: Player.hpp:138
int numberOudlers
The number of oudlers the player has among his/her initial cards.
Definition: Player.hpp:142
A structure to automatically fix an insert order into cards' sets.
Definition: Player.hpp:128
vector< shared_ptr< Card > > initialCards
The vector of player's initial cards, from his/her starting hand.
Definition: Player.hpp:141
set< shared_ptr< Card >, cardOrder > diamonds
The set of Diamonds owned by the player.
Definition: Player.hpp:137
string name
The player's name.
Definition: Player.hpp:110
set< Announcements > announced
The set of announcements (for what?).
Definition: Player.hpp:144
vector< shared_ptr< Card > > getInitialCards() const
Inline assessor to the player's initial cards.
Definition: Player.hpp:76
shared_ptr< Card > fool
The pointer toward the Fool, if owned by the player.
Definition: Player.hpp:140
int getNumberOudlers() const
Inline assessor to the number of oudlers the player has with his/her initial hand.
Definition: Player.hpp:79
Player is an abstract class presenting a common interface for AI and Human players.
Definition: Player.hpp:36