This class manages the current and previously played tricks. More...
#include <Trick.hpp>
Public Member Functions | |
Trick () | |
The unique constructor of Trick. More... | |
set< shared_ptr< Card > > | getAllCards () const |
Get all cards in the current trick. More... | |
void | setCard (const shared_ptr< Player > player, const shared_ptr< Card > card) |
Update the trickCards map, and determine also the value of other variables like foolPlayer, greaterTrump and leader. More... | |
double | getScore () const |
To get the cumulative points of the current trick. More... | |
int | getNumberOfCards () const |
Inline function returning the number of cards composing the trick. More... | |
void | showAllCards () const |
Show all card of the current trick. More... | |
void | clearTrick () |
Clear trick data (cards, leader, ...). More... | |
shared_ptr< Card > | getCard (const shared_ptr< Player > player) const |
Inline assessor to the card played of the given player during the current trick. More... | |
shared_ptr< Card > | getWinCard () const |
Inline function returning the card which takes the trick. More... | |
shared_ptr< Player > | getLeader () const |
shared_ptr< Player > | getFoolPlayer () const |
shared_ptr< Card > | getGreaterTrump () const |
Suits | getReferenceSuit () const |
This class manages the current and previously played tricks.
Trick::Trick | ( | ) |
The unique constructor of Trick.
void Trick::clearTrick | ( | ) |
Clear trick data (cards, leader, ...).
set< shared_ptr< Card > > Trick::getAllCards | ( | ) | const |
Get all cards in the current trick.
Inline assessor to the card played of the given player during the current trick.
|
inline |
|
inline |
|
inline |
|
inline |
Inline function returning the number of cards composing the trick.
|
inline |
double Trick::getScore | ( | ) | const |
To get the cumulative points of the current trick.
|
inline |
Inline function returning the card which takes the trick.
Update the trickCards map, and determine also the value of other variables like foolPlayer, greaterTrump and leader.
player | A pointer on the player who just played. |
card | A point on the card the player just played. |
void Trick::showAllCards | ( | ) | const |
Show all card of the current trick.