-
Notifications
You must be signed in to change notification settings - Fork 3
/
Node.h
46 lines (39 loc) · 764 Bytes
/
Node.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
/*
* File: Node.h
* Author: ozielcarneiro
*
* Created on October 17, 2012, 9:45 PM
*/
#include "Map.h"
#include <vector>
#include <sstream>
using namespace std;
#ifndef NODE_H
#define NODE_H
class Node {
public:
Node();
Node(const Node& orig);
virtual ~Node();
int minmax(int alpha, int beta);
int utility();
void setMap(Map *map);
void setTurn(int turn);
void setTurnPlayer();
void successors();
void play(Node *play,int x, int y);
string getPlay();
int getValue();
private:
Map* map;
char turnPlayer;
int turn;//1=max 2=min
vector<int> xPlay;
vector<int> yPlay;
int alpha;
int beta;
int minmaxValue;
vector<int> xSuc;
vector<int> ySuc;
};
#endif /* NODE_H */