-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPawn.h
51 lines (36 loc) · 833 Bytes
/
Pawn.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
//
// Created by johann on 28/03/17.
//
#ifndef OTHELLO_PAWN_H
#define OTHELLO_PAWN_H
#include "Header.h"
class Tile {
private:
e_color color = e_color::NONE;
char widget = '\0';
bool target = false;
public:
Tile() {}
Tile(e_color color) : color(color) {}
void init_tile(const int &ind_lhs, const int &ind_rhs);
char getWidget() const {
return widget;
}
void setWidget(char widget) {
Tile::widget = widget;
}
e_color getColor() const {
return color;
}
void setColor(e_color color) {
(color != e_color::NONE) ? setWidget('O') : setWidget('\0');
Tile::color = color;
}
bool isTarget() const {
return target;
}
void setTarget(bool target) {
Tile::target = target;
}
};
#endif //OTHELLO_PAWN_H