-
Notifications
You must be signed in to change notification settings - Fork 1
/
statisticalmodel.h
47 lines (33 loc) · 1.07 KB
/
statisticalmodel.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 STATISTICALMODEL_H
#define STATISTICALMODEL_H
#include <QList>
#include "player.h"
class StatisticalModel
{
class Context
{
public:
Context(float potOdds, Player::Action lastAction, const Deck &communityCards, int handPower) :
m_potOdds(potOdds),
m_lastAction(lastAction),
m_communityCards(communityCards),
m_handPower(handPower)
{ }
QString toString() const;
static Context fromString(QString string);
float m_potOdds;
Player::Action m_lastAction;
Deck m_communityCards;
int m_handPower;
};
public:
StatisticalModel();
~StatisticalModel();
void addContext(float potOdds, Player::Action lastAction, const Deck &communityCards, int handPower);
int estimateHandPower(float potOdds, Player::Action lastAction, const Deck &communityCards);
void save(QString filename = "playermodel.csv");
void load(QString filename = "playermodel.csv");
private:
QList<Context> m_contexts;
};
#endif // STATISTICALMODEL_H