-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrawPile.h
57 lines (46 loc) · 1.17 KB
/
DrawPile.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
#ifndef _DRAWPILE_H
#define _DRAWPILE_H
#include "Pile.h"
#include <string>
/**
* A draw pile of Skip-Bo card.
*/
class DrawPile : public Pile {
public:
/**
* Non-default constructor for DrawPile.
* Creates a DrawPile object (inherited from Pile).
*
* @param shuffle determines whether DrawPile is shuffled
*/
DrawPile(bool shuffle) : isShuffled(shuffle) { }
/**
* Non-default constructor for DrawPile.
* Creates a DrawPile object (inherited from Pile) with data from a txt file.
*
* @param shuffle determines whether DrawPile is shuffled
* @param filename is the name of file to read from
*/
DrawPile(bool shuffle, std::string filename);
/**
* Shuffles DrawPile if shuffling is enabled.
*
* @param shuffle determines whether DrawPile is shuffled
*/
void helpShuffle(bool shuffle);
/**
* Returns a string representation of the shuffle state of DrawPile.
*/
std::string getRand() const;
/**
* Destructor for DrawPile.
*/
~DrawPile() { }
/**
* Display contents of DrawPile during game play.
*/
void display() const override;
private:
bool isShuffled; // the shuffle state of the DrawPile
};
#endif