-
Notifications
You must be signed in to change notification settings - Fork 0
/
Coordinate.h
49 lines (40 loc) · 924 Bytes
/
Coordinate.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
//--------------------------------
// COMP 472
// Ganji-Ho
// Vince Abruzzese (26448585)
// John Di Girolamo (26202918)
// Coordinate.h
//--------------------------------
#ifndef COORDINATE_H
#define COORDINATE_H
int const BOARD_SIZE = 8;
int const MAX_AVAILABLE_MOVES = (BOARD_SIZE - 1) * BOARD_SIZE;
char const AVAILABLE = '.';
char const PLAYER_ONE = 'O';
char const PLAYER_TWO = 'X';
//The Coordinate struct will be used for each entry on the board
class Coordinate
{
public:
//constructors
Coordinate();
Coordinate(Coordinate ©);
virtual ~Coordinate(){}
//accessors
int getX();
int getY();
char getValue();
int getMinimax();
//mutators
void setX(int x);
void setY(int y);
void setValue(char value);
void setMinimax(int minimax_value);
private:
int x;
int y;
char value;
int minimax_value; //used for minimax search
};
Coordinate string_to_coordinate(char* coordinate);
#endif COORDINATE_H