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

StratDiff is the abstract class handling the Strategy pattern for applying different AI difficulties. More...

#include <StratDiff.hpp>

Inheritance diagram for StratDiff:
Inheritance graph
Collaboration diagram for StratDiff:
Collaboration graph

Public Member Functions

virtual shared_ptr< CardplayCard (const vector< shared_ptr< Card > > &cardsCanPlay) const =0
 playCard is a pure virtual function returning the card the player chooses to play. More...
 
virtual Biddings bid (const Biddings bestBid, const int numberOudlers, const bool chelemAnnounced) const =0
 Called to decide if we propose a bid or not, and if any, what bid. More...
 
virtual set< shared_ptr< Card > > makeEcart (const int dogSize, const vector< shared_ptr< Card > > &allCards) const =0
 To make the ecart once we take the dog. More...
 

Detailed Description

StratDiff is the abstract class handling the Strategy pattern for applying different AI difficulties.

Member Function Documentation

virtual Biddings StratDiff::bid ( const Biddings  bestBid,
const int  numberOudlers,
const bool  chelemAnnounced 
) const
pure virtual

Called to decide if we propose a bid or not, and if any, what bid.

Parameters
bestBidThe best bid proposed so far.
numberOudlersThe number of oudlers we have in our hand.
chelemAnnouncedA Boolean to know if someone has declared a chelem.
Returns
Our bid (Biddings::none if we pass).

Implemented in Beginner.

virtual set< shared_ptr<Card> > StratDiff::makeEcart ( const int  dogSize,
const vector< shared_ptr< Card > > &  allCards 
) const
pure virtual

To make the ecart once we take the dog.

makeEcart is delegated to the difficulty Strategy.

Parameters
dogSizeThe number of card we must include into the ecart.
allCardsThe vector of all our cards, including the dog.
Returns
A set of Card pointers for the cards we place into the ecart.

Implemented in Beginner.

virtual shared_ptr<Card> StratDiff::playCard ( const vector< shared_ptr< Card > > &  cardsCanPlay) const
pure virtual

playCard is a pure virtual function returning the card the player chooses to play.

Parameters
cardCanPlayThe vector of cards one is allowed to play.
Returns
The chosen card to play.

Implemented in Beginner.


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