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

This class manages the current and previously played tricks. More...

#include <Trick.hpp>

Collaboration diagram for Trick:
Collaboration graph

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< CardgetCard (const shared_ptr< Player > player) const
 Inline assessor to the card played of the given player during the current trick. More...
 
shared_ptr< CardgetWinCard () const
 Inline function returning the card which takes the trick. More...
 
shared_ptr< PlayergetLeader () const
 
shared_ptr< PlayergetFoolPlayer () const
 
shared_ptr< CardgetGreaterTrump () const
 
Suits getReferenceSuit () const
 

Detailed Description

This class manages the current and previously played tricks.

Constructor & Destructor Documentation

Trick::Trick ( )

The unique constructor of Trick.

Member Function Documentation

void Trick::clearTrick ( )

Clear trick data (cards, leader, ...).

set< shared_ptr< Card > > Trick::getAllCards ( ) const

Get all cards in the current trick.

shared_ptr<Card> Trick::getCard ( const shared_ptr< Player player) const
inline

Inline assessor to the card played of the given player during the current trick.

shared_ptr<Player> Trick::getFoolPlayer ( ) const
inline
shared_ptr<Card> Trick::getGreaterTrump ( ) const
inline
shared_ptr<Player> Trick::getLeader ( ) const
inline
int Trick::getNumberOfCards ( ) const
inline

Inline function returning the number of cards composing the trick.

Suits Trick::getReferenceSuit ( ) const
inline
double Trick::getScore ( ) const

To get the cumulative points of the current trick.

shared_ptr<Card> Trick::getWinCard ( ) const
inline

Inline function returning the card which takes the trick.

void Trick::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.

Parameters
playerA pointer on the player who just played.
cardA point on the card the player just played.
void Trick::showAllCards ( ) const

Show all card of the current trick.


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