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

One of the proposed difficulty. More...

#include <Beginner.hpp>

Inheritance diagram for Beginner:
Inheritance graph
Collaboration diagram for Beginner:
Collaboration graph

Public Member Functions

Biddings bid (const Biddings bestBid, const int numberOudlers, const bool chelemAnnounced) const
 Called to decide if we propose a bid or not, and if any, what bid. More...
 
set< shared_ptr< Card > > makeEcart (const int dogSize, const vector< shared_ptr< Card > > &allCards) const
 To make the ecart once we take the dog. More...
 
shared_ptr< CardplayCard (const vector< shared_ptr< Card > > &cardsCanPlay) const
 Choose what card we play, given the first card and the highest trump of the trick. More...
 

Detailed Description

One of the proposed difficulty.

Beginner is one of the concrete class of the Strategy pattern dealing with the game difficulty (i.e., how good the AI is).

Member Function Documentation

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

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

bid is delegated to the difficulty Strategy.

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).

Implements StratDiff.

set< shared_ptr< Card > > Beginner::makeEcart ( const int  dogSize,
const vector< shared_ptr< Card > > &  allCards 
) const
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.

Implements StratDiff.

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

Choose what card we play, given the first card and the highest trump of the trick.

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

Implements StratDiff.


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