Deck is the class managing the deck of cards. Used as well as for the game deck, but also for a counting cards AI.
More...
#include <Deck.hpp>
Deck is the class managing the deck of cards. Used as well as for the game deck, but also for a counting cards AI.
The unique constructor of Deck.
bool Deck::hasStrongerThan |
( |
const shared_ptr< Card > |
card | ) |
const |
Tests if the current deck has a stronger card than to proposed one.
- Parameters
-
- Returns
- True iff the deck has a stronger card than the input.
int Deck::indexInDeck |
( |
const shared_ptr< Card > |
card | ) |
const |
indexInDeck returns the index of a card in the deck.
- Parameters
-
- Returns
- The index of card in the Deck, or -1 if the deck does not contain it.
Make a new deal; create each card of the game.
Calls random_shuffle from the algorithm library.
vector< shared_ptr<Card> > Deck::cards |
The vector of all cards in the deck.
vector< shared_ptr<Card> > Deck::heads |
The vector of head cards (useful calling a card for 5-players games).
The number of Clubs in the deck.
The number of Diamonds in the deck.
The number of Hearts in the deck.
The number of Spades in the deck.
The number of Trumps in the deck.
The documentation for this class was generated from the following files: