-
Notifications
You must be signed in to change notification settings - Fork 1
/
Deck.h
43 lines (38 loc) · 1.08 KB
/
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
#pragma once
#include "Suit.h"
#include "Face.h"
#include "HoleCards.h"
class AllHands;
class BurnAndTurn;
class Community;
const auto DeckSize = SuitCount * FaceCount;
class Deck
{
public:
Deck() = default;
Deck(const Deck& rhs) = default;
Deck(Deck&& rhs) = default;
~Deck() = default;
Deck& operator=(const Deck& rhs) = default;
Deck& operator=(Deck&& rhs) = default;
using iterator = array<int, DeckSize>::iterator;
iterator begin();
iterator end();
void Remove(iterator which);
void Remove(int card);
void Remove(const HoleCards& hole);
void Remove(const HoleCards& hole, int c1, int c2, int c3, int c4, int c5);
void Remove(const BurnAndTurn& cards);
void Remove(const Community& community);
void RemoveSingleCardLosses(const AllHands& allHands, int bestHand, int c1, int c2, int c3, int c4, int c5);
vector<HoleCards> FindTwoCardLosses(const AllHands& allHands, int bestHand, int c1, int c2, int c3, int c4, int c5);
void Add(int card);
int GetSize() const;
void Clear();
void NewDeck();
void Shuffle();
int DealCard();
private:
int size = 0;
array<int, DeckSize> cards;
};