Protected Attributes |
std::vector< card * > | _cards |
int | _score |
Constructor & Destructor Documentation
Member Function Documentation
void card_hand::add_card |
( |
card * |
card | ) |
|
Add a new card to the hand, and evaluates score if necessary
- Parameters
-
card | the card object to add to the hand |
card * card_hand::card_at |
( |
int |
idx | ) |
|
Get a pointer to a card in the hand
- Parameters
-
- Returns
- the card pointer
void card_hand::conceal |
( |
| ) |
|
Turns all cards face down
void card_hand::evaluate |
( |
| ) |
|
|
protectedvirtual |
Stub for evaluate function, should be overridden by a subclass Sets score to zero
int card_hand::get_count |
( |
| ) |
|
Get the number of cards in the hand
- Returns
- number of cards in the hand
int card_hand::get_score |
( |
| ) |
|
Get the hand score
- Returns
- the hand score
bool card_hand::needs_evaluate |
( |
| ) |
|
|
protectedvirtual |
Stub for needs_evaluate function, should be overridden by a subclass
- Returns
- always returns false
void card_hand::remove_card |
( |
int |
idx | ) |
|
Remove a card from the hand
- Parameters
-
idx | the index of the card in the hand |
void card_hand::return_cards |
( |
| ) |
|
Removes all cards from its cards field
void card_hand::reveal |
( |
| ) |
|
string card_hand::str |
( |
| ) |
|
|
virtual |
Print the string representation of each card, separated by a space
- Returns
- a string representation of the hand
Reimplemented in blackjack_hand.
The documentation for this class was generated from the following files: