#include <user.h>
|
| User (const int playerLimit) |
|
void | chance (Deck &deck) override |
| Ask the user if he wants to HIT or STAND.
|
|
void | hit (Deck &deck) override |
| Compute the score based on the card the user is dealt.
|
|
| Player () |
|
| Player (std::string_view name, const int playerLimit) |
|
virtual | ~Player ()=default |
|
std::string_view | getName () const |
| Get the player's name.
|
|
int | getScore () const |
| Get the player's score.
|
|
bool | isBusted () const |
| Return if a player is busted.
|
|
bool | isStand () const |
| Return if a player STANDS.
|
|
void | setOutcome (Outcome outcome) |
| Set the player's outcome upon finishing the game.
|
|
Outcome | getOutcome () const |
| Get the outcome of the player's game.
|
|
void | reset () |
| Reset the scores and status of the players (to play another game)
|
|
virtual void | chance (Deck &deck)=0 |
| Defines the chance of a player.
|
|
virtual void | hit (Deck &deck)=0 |
| Defines the actions performed when a player HITS (as opposed to STANDS).
|
|
◆ User()
User::User |
( |
const int |
playerLimit | ) |
|
|
inline |
◆ chance()
void User::chance |
( |
Deck & |
deck | ) |
|
|
overridevirtual |
Ask the user if he wants to HIT or STAND.
Implements Player.
◆ hit()
void User::hit |
( |
Deck & |
deck | ) |
|
|
overridevirtual |
Compute the score based on the card the user is dealt.
Implements Player.
The documentation for this class was generated from the following files: