-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayer.h
More file actions
66 lines (43 loc) · 901 Bytes
/
player.h
File metadata and controls
66 lines (43 loc) · 901 Bytes
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
58
59
60
61
62
63
64
65
66
//
// Created by Heliou on 28/06/2017.
//
#ifndef PLAYER_H
#define PLAYER_H
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <functional>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <stdlib.h>
#include <math.h>
using namespace std;
class Player {
public:
long double* y_strat;
double* proba_strat;
Player(int id, double** payoff);
~Player();
int getId() const;
int getStrat() const;
double getUt() const;
void setStrat(int s);
bool update_proba();
void draw_ini_weight();
void set_weight(double w1, double w2);
int draw_proba();
bool isConverged() const;
double* utility(int strat_other);
void print_Payoff();
private:
const int _id;
int _strat;
bool _converged;
double ut;
double** _payoff;
};
ostream &operator<<(ostream &flux, Player &P);
#endif //PLAYER_H