-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.h
executable file
·67 lines (40 loc) · 1.13 KB
/
board.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef BOARD_H
#define BOARD_H
#include <vector>
#include <utility>
#include <ctime>
#define pb push_back
#define F first
#define S second
#define pii pair<int,int>
using namespace std;
class board
{
public:
std::vector<std::vector<int> > points;
std::vector<pii > ring_p1;
std::vector<pii > ring_p2;
int r1,r2;
int flag1,flag2;
board();
board(const board &b);
void place_ring(int player,int x, int y);
int move_index(int x1, int y1, int x2, int y2);
void move_ring(int player, int x1, int y1, int x2, int y2);
void remove_row(int x1, int y1, int x2, int y2);
void remove_ring(int player, int x, int y);
bool isEmpty(int x, int y);
pii convert(int hexagon , int position);
pii best_ring_place(vector<pair<int,int> > positions);
int value(int x, int y);
bool isValid(int x, int y);
pii to_hexagon(int x , int y );
// returns vector of all possible row to be removed for both the players
// player1 in v[0] and player2 in v[1]
vector< std::vector<pair<pii,pii> > > find_row();
//gives best ring position to place
pair<double,double> score();
pair<double,double> evaluation();
void printb();
};
#endif