-
Notifications
You must be signed in to change notification settings - Fork 21
/
Hand.h
56 lines (43 loc) · 1020 Bytes
/
Hand.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
#ifndef __HAND__
#define __HAND__
#include <iostream>
#include <inttypes.h>
#include "Card.h"
using namespace std;
class Hand {
public:
enum Stage { Start, Hole, Flop, Turn, River };
static const int SuitShift[SUITSIZE];
Hand();
void setHole( Card*, Card* ); // setting cards in Hands
void setFlop( Card*, Card*, Card* ); // setting cards after Flop
void setTurn( Card* ); // setting card after Turn
void setRiver( Card* ); // setting card after River
//string getHighestValue();
bool isStraightFlush();
bool isFourOfAKind();
bool isFullHouse();
bool isFlush();
bool isStraight();
bool isThreeOfAKind();
bool isPair();
private:
inline void init();
inline int lowBit( unsigned int );
inline int countBits( unsigned int );
bool isThreeOfAKind( int* );
int flush;
int straight[SUITSIZE];
int handvalue;
int highcard;
bool straightflush;
bool fullhouse;
bool fourofakind;
bool threeofakind;
Stage stage;
Card* hole[2];
Card* flop[3];
Card* turn;
Card* river;
};
#endif