-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHand.h
executable file
·55 lines (43 loc) · 2.21 KB
/
Hand.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
#ifndef BLACK_JACK_HAND_H
#define BLACK_JACK_HAND_H
#include "Deck.h"
//-----------------------------------------------------------------------------
// Purpose: Represents a hand in blackjack. Contains an array of cards and a
// pointer to the deck it is drawing from, so two hands can actually share one
// Deck.
//-----------------------------------------------------------------------------
class Hand {
public:
Hand(Deck *deck);
virtual ~Hand();
//-----------------------------------------------------------------------------
// Render all the cards in the hand on screen and shape them accordingly
//-----------------------------------------------------------------------------
void Render();
//-----------------------------------------------------------------------------
// Purpose: Draw a card from a deck and add it to the hand
//-----------------------------------------------------------------------------
void Draw();
//-----------------------------------------------------------------------------
// Purpose : Count the cards to get their value to see where they are from 0-21
//-----------------------------------------------------------------------------
int Count();
//-----------------------------------------------------------------------------
// Purpose: Rest the Hand for a new round
//-----------------------------------------------------------------------------
void Reset();
//-----------------------------------------------------------------------------
// Purpose: The Y value where the hand will be rendered
//-----------------------------------------------------------------------------
int Y;
protected:
//-----------------------------------------------------------------------------
// Purpose: Pointer to the deck the hand takes it's cards from
//-----------------------------------------------------------------------------
Deck *_Deck;
//-----------------------------------------------------------------------------
// Purpose: Where we want to store the hand's cards
//-----------------------------------------------------------------------------
Card::Cards _Cards;
};
#endif // BLACK_JACK_HAND_H