-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.cpp
More file actions
51 lines (40 loc) · 714 Bytes
/
node.cpp
File metadata and controls
51 lines (40 loc) · 714 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
#include "node.h"
Node::Node(Move *move, Side side, Side maximizer, Board *board) {
this->move = move;
this->side = side;
this->maximizer = maximizer;
this->board = board;
this->alpha = -99999999;
this->beta = 99999999;
}
Node::~Node() {
// free some stuff
delete board;
}
Board *Node::getBoard() {
return board;
}
Move *Node::getMove() {
return move;
}
Side Node::getSide() {
return side;
}
Node *Node::getParent() {
return parent;
}
void Node::setParent(Node *node) {
parent = node;
}
int Node::getAlpha() {
return alpha;
}
int Node::getBeta() {
return beta;
}
void Node::setAlpha(int alpha) {
this->alpha = alpha;
}
void Node::setBeta(int beta) {
this->beta = beta;
}