-
Notifications
You must be signed in to change notification settings - Fork 0
/
Element.hpp
47 lines (42 loc) · 1.25 KB
/
Element.hpp
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
#ifndef Element_HPP
#define Element_HPP
#include <list>
#include <array>
#include <iostream>
class Element {
public:
using Array = std::array<std::array<int,15>,15>;
Element(const Array& _board, std::pair<int,int> _move, bool _turn, std::array<int,6> counters);
Element(const Array& _board);
~Element();
int searchNVertical(int line, int column, int player);
int searchNHorizontal(int line, int column, int player);
int searchNDiagonal1(int line, int column, int player);
int searchNDiagonal2(int line, int column, int player);
int getN_IADoubles();
int getN_IATriples();
int getN_IAQuadruples();
int getN_AdvDoubles();
int getN_AdvTriples();
int getN_AdvQuadruples();
std::array<int,6> getCounters();
void verifyBlock(std::pair<int,int> cord, bool player);
void updateCounters(int nBlocks, bool player);
std::list<std::pair<int,int>> getPossibleMoves();
std::array<std::array<int,15>,15> getBoard();
bool isLeaf();
void printBoard() {
std::cout << std::endl;
for(int i = 0; i < 15; i++){
for(int j = 0; j < 15; j++){
std::cout << board[i][j];
}
std::cout << std::endl;
}
}
private:
Array board;
std::array<int,6> blockCounters;
bool leaf = false;
};
#endif