-
Notifications
You must be signed in to change notification settings - Fork 0
/
players.h
58 lines (51 loc) · 1.27 KB
/
players.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* Blackjack in C++
* players.h
* Author: Danny Noe
* Description: players.h contains two classes.
* Dealer class: represents the dealer in blackjack
* Player class: represents a player in blackjack
*/
#ifndef __PLAYERS_H__
#define __PLAYERS_H__
#include "deck.h"
#include <string>
#include <vector>
using std::string;
//------------------------------------------------------------------------------------------
/**
* Dealer Class
* Dealer class represents the dealer in blackjack
*/
class Dealer
{
private:
Deck game_deck;
public:
std::vector<Card> dealerHand;
Dealer();
Card dealCard();
void updateHand(Card new_card);
void shuffle();
operator string() const;
};
//------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------
/**
* Player Class
* the class represents a player in blackjack
*/
class Player
{
private:
int chips;
public:
std::vector<Card> playerHand;
Player();
int getChips();
void updateChips(int difference);
void updateHand(Card new_card);
operator string() const;
};
//------------------------------------------------------------------------------------------
#endif