-
Notifications
You must be signed in to change notification settings - Fork 1
/
table.h
57 lines (41 loc) · 869 Bytes
/
table.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 TABLE_H
#define TABLE_H
#include "card.h"
#include "deck.h"
#include "player.h"
#include "statisticalmodel.h"
#include <QMap>
class Player;
class Deck;
class Card;
class Table
{
public:
enum Phase {
I,
II,
III
};
Table(Phase phase);
Deck flop() { return m_flop; }
Card turn() { return m_turn; }
Card river() { return m_river; }
int pot() { return m_pot; }
int lastBet() { return m_lastBet; }
int numPlayers() { return m_players.size(); }
int activePlayers();
void play(int rounds);
private:
void playHand();
void doBettingRound();
QList<Player> m_players;
Deck m_flop;
Card m_turn;
Card m_river;
int m_pot;
int m_lastBet;
Phase m_phase;
// Username <> Statistical model
QMap<QString, StatisticalModel> m_models;
};
#endif // TABLE_H