-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplayer.cpp
More file actions
102 lines (79 loc) · 1.58 KB
/
player.cpp
File metadata and controls
102 lines (79 loc) · 1.58 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#include "player.h"
Player::Player(QObject *parent) : QObject(parent)
{
}
int Player::getCaptures(){
return captures;
}
bool Player::doHints(){
return do_hints;
}
QString Player::getColorString(){
return color_string;
}
int Player::getHandicap(){
return this->handicap;
}
qreal Player::getKomi(){
return this->komi_value;
}
QString Player::getName(){
return this->name;
}
PlayerColors Player::getPlayerColor(){
return this->color;
}
QString Player::getSpecies(){
return this->species;
}
void Player::setDoHints(bool do_hints){
this->do_hints = do_hints;
}
void Player::setCaptures(int capt){
this->captures = capt;
}
void Player::setHandicap(int handicap){
this->handicap = handicap;
}
void Player::setKomi(qreal komi){
this->komi_value = komi;
}
void Player::setName(QString name){
this->name = name;
}
void Player::setColor(PlayerColors color){
this->color = color;
if(color == Black){
color_string = "black";
}else{
color_string = "white";
}
}
void Player::setColor(QString color){
this->color_string = color;
if(color == "black"){
this->color = Black;
}else{
this->color = White;
}
}
void Player::setSpecies(QString species){
this->species = species;
}
void Player::reset(){
captures = 0;
is_passing = false;
has_resigned = false;
}
void Player::setIsPassing(bool p){
is_passing = p;
}
bool Player::getIsPassing(){
return is_passing;
}
void Player::setResigned(bool r){
this->has_resigned =r;
}
bool Player::getResigned(){
return has_resigned;
}