Constructor & Destructor Documentation
blackjack_game::blackjack_game |
( |
| ) |
|
Initialise the blackjack game object
blackjack_game::~blackjack_game |
( |
| ) |
|
Delete the hands and the deck when the game object is destroyed
Member Function Documentation
Gets the players hand object
- Returns
void blackjack_game::deal_card_to |
( |
blackjack_hand * |
hand, |
|
|
bool |
flip |
|
) |
| |
|
private |
Deal a card to the hand
- Parameters
-
hand | the hand to deal to |
flip | whether to deal it face up (true) or face down |
Gets the dealers hand object
- Returns
void blackjack_game::hit |
( |
| ) |
|
Gives the player a new card
bool blackjack_game::player_won |
( |
| ) |
|
Checks if the player won
- Returns
void blackjack_game::stand |
( |
| ) |
|
Ends the players turn, the dealer then tries to match their score
void blackjack_game::start |
( |
| ) |
|
Starts a new blackjack game, returns cards, shuffles the deck and deals new cards to the player and dealer
The documentation for this class was generated from the following files: