-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHand.h
More file actions
29 lines (27 loc) · 876 Bytes
/
Hand.h
File metadata and controls
29 lines (27 loc) · 876 Bytes
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
#ifndef HAND_H
#define HAND_H
#include <iostream>
#include "LinkedList.h"
using namespace std;
class Hand{
private:
LinkedList* hand;
public:
Hand();
Hand(const Hand&); //copy constructor (check syntax of big 3!)
~Hand(); //destructor
Hand& operator = (Hand&); //assignment operator overload
void addCard();
void removeCard();
int getTotalValue(); //returns value of the entire hand
int getCount();
void convertAcesDown(); //convert ace's value to 1
/*can be like:
while(value>21)
//convert Ace value from 11 to 1
*/
static int compareHand(const Hand&); //return 0 if hands have the same total value, +ve # if calling hand has higher value than parameter hand, etc.
void display();
friend ostream& operator << (ostream&, Hand&);
};
#endif