-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeck.h
58 lines (38 loc) · 1015 Bytes
/
Deck.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
//
//// Jack Bennett 0370668//
//
#ifndef HEARTS_DECK_H
#define HEARTS_DECK_H
#include <iostream>
#include <vector>
#include "Card.h"
#include "Player.h"
#include<random>
class Deck: private std::vector<Card*> {
public:
// default constructor
Deck();
// a constructor which calls the reset method
Deck(bool fullDeck);
//destructor
virtual ~Deck();
//shuffle deck
void shuffleDeck();
// print deck
void print() const;
//caling my card print method with a for loop
// a reset method
void reset(bool fullDeck);
//draw method
// datastructure creation:
//calling vector methods to use
using std::vector<Card*>::begin;
using std::vector<Card*>::erase;
using std::vector<Card*>::clear;
using std::vector<Card*>::size;
using std::vector<Card*>::at;
using std::vector<Card*>::empty;
using std::vector<Card*>::push_back;
};
extern std::istream& operator>> (std::istream& in, Deck& deck);
#endif //HEARTS_DECK_H