-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeck.h
47 lines (38 loc) · 795 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
#ifndef DECK_H
#define DECK_H
#include "Card.h"
#include <deque>
class Deck
{
public:
/**
* @brief Deck creates a new Deck.
*/
Deck();
/**
* @brief draw draws a card from the Deck.
* @return the Card that was drawn from the Deck.
*/
Card draw();
/**
* @brief shuffle shuffles the Deck.
*/
void shuffle();
/**
* @brief add adds the specified Card back in the deck.
* @param card the Card to add.
*/
void add(Card card);
/**
* @brief isEmpty determines whether or not the Deck is empty.
* @return true if the Deck is empty.
* @return false if the Deck isn't empty.
*/
bool isEmpty() const;
private:
Deck(Deck& deck) = delete;
Deck& operator=(Deck& other) = delete;
private:
std::deque<Card> m_cards;
};
#endif // DECK_H