-
Notifications
You must be signed in to change notification settings - Fork 4
/
Stone.cpp
77 lines (70 loc) · 1.01 KB
/
Stone.cpp
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
#ifndef STONE_CPP
#define STONE_CPP
#include "textbaduk2.h"
Stone::Stone()
{
owner = 0;
placed = false;
territory = false;
character = '+';
checked = false;
childUp = 0;
childDown = 0;
childLeft = 0;
childRight = 0;
}
Stone::~Stone()
{
owner = -1;
placed = false;
territory = false;
}
void Stone::setUpChild(Stone* newChild)
{
childUp = newChild;
}
void Stone::setDownChild(Stone* newChild)
{
childDown = newChild;
}
void Stone::setLeftChild(Stone* newChild)
{
childLeft = newChild;
}
void Stone::setRightChild(Stone* newChild)
{
childRight = newChild;
}
void Stone::setChar(char newChar)
{
character = newChar;
}
char Stone::getChar()
{
return character;
}
Stone* Stone::getUpChild()
{
return childUp;
}
Stone* Stone::getDownChild()
{
return childDown;
}
Stone* Stone::getLeftChild()
{
return childLeft;
}
Stone* Stone::getRightChild()
{
return childRight;
}
void Stone::setChecked(bool newValue)
{
checked = newValue;
}
bool Stone::getChecked()
{
return checked;
}
#endif