Blackjack
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Blackjack Class Reference

A game of Blackjack is defined by the players, a deck of cards, and a few parameters based on the rules. More...

#include <blackjack.h>

Public Member Functions

 Blackjack (Players &players)
 Initialize the players playing Blackjack.
 
void resetPlayers ()
 Reset each player.
 
void play ()
 Play a game of Blackjack.
 
void displayResult ()
 Display the result for each player.
 

Detailed Description

A game of Blackjack is defined by the players, a deck of cards, and a few parameters based on the rules.

Constructor & Destructor Documentation

◆ Blackjack()

Blackjack::Blackjack ( Players players)
inline

Initialize the players playing Blackjack.

  • Initially all players are active (naturally).
    Parameters
    players

Member Function Documentation

◆ resetPlayers()

void Blackjack::resetPlayers ( )

Reset each player.

  • Each player in m_players is reset.
  • active_players is cleared and re-initialized with the reset players.

◆ play()

void Blackjack::play ( )

Play a game of Blackjack.

  • Each User is first hit twice.
  • You play while gameNotOver
  • Once it's over, you computePlayerOutcomes

◆ displayResult()

void Blackjack::displayResult ( )

Display the result for each player.


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