-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplayer.h
68 lines (63 loc) · 1.4 KB
/
player.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
58
59
60
61
62
63
64
65
66
67
68
#ifndef PLAYER_H_INCLUDED
#define PLAYER_H_INCLUDED
#include <cmath>
#include <string>
#include <map>
#include <vector>
#include <iomanip>
#include <iostream>
#include <list>
#include"card.h"
#include"deck.h"
using namespace std;
/*
Interface utilizada para criar o bot e o humano
*/
class player{
protected:
vector<card> player_hand; // Atributo que possui as cartas que o player possui na rodada
int pontos;
int quedas;
static int criacao_jogador_atual;
bool is_bot;
public:
// Métodos virtuais
virtual int get_size() {
return 0;
}
void add_pontos(int i) {
pontos += i;
}
int get_pontos() {
return pontos;
}
void ganha_queda() {
quedas += 1;
}
int get_quedas() {
return quedas;
}
virtual std::string get_name() {
return "";
}
card get_card(int i) {
return player_hand[i];
}
void atualizar_jogador(deck D) {
return;
}
card play_card(int i) {
return player_hand[0];
}
bool is_a_bot() {
return is_bot;
}
virtual int accept_refuse_truco() {
return 0;
}
virtual int ask_truco() {
return 0;
}
};
int player::criacao_jogador_atual = 1;
#endif