Blackjack Program  Iteration 2
Core Exercise HIT3172
 All Classes Functions Variables Enumerations Enumerator
Public Member Functions | Private Member Functions | List of all members
blackjack_hand Class Reference
Inheritance diagram for blackjack_hand:
card_hand

Public Member Functions

 blackjack_hand ()
std::string str ()
bool is_full ()
bool is_blackjack ()
bool is_busted ()
- Public Member Functions inherited from card_hand
 card_hand ()
void add_card (card *card)
void remove_card (int idx)
cardcard_at (int idx)
void return_cards ()
void reveal ()
void conceal ()
int get_score ()
int get_count ()
bool is_all_faceup ()

Private Member Functions

virtual bool needs_evaluate ()
virtual void evaluate ()

Additional Inherited Members

- Protected Member Functions inherited from card_hand
virtual bool needs_evaluate ()
virtual void evaluate ()
- Protected Attributes inherited from card_hand
std::vector< card * > _cards
int _score

Constructor & Destructor Documentation

blackjack_hand::blackjack_hand ( )

Initialise the blackjack hand

Member Function Documentation

void blackjack_hand::evaluate ( )
privatevirtual

Calculates the score of the hand

bool blackjack_hand::is_blackjack ( )

Check if the hand has blackjack

Returns
if the hand has blackjack
bool blackjack_hand::is_busted ( )

Check if the hand is bust

Returns
if the hand is bust
bool blackjack_hand::is_full ( )

Check if the hand is full (ie. cannot take any more cards)

Returns
if the hand is full
bool blackjack_hand::needs_evaluate ( )
privatevirtual

Checks if the hand needs evaluating

Returns
boolean true/false
string blackjack_hand::str ( )
virtual

Creates a string representation of the blackjack hand

Returns
a string representation of the blackjack hand

Reimplemented from card_hand.


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