-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h
36 lines (20 loc) · 925 Bytes
/
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
#include <iostream>
#include <vector>
#include "Node.h"
#ifndef BOARD_H
#define BOARD_H
#define SIZE 3
class Board {
private:
Node::STATES static getNextPlayer(std::vector< std::vector < Node* > > board);
public:
std::vector< std::vector < Node* > >* board = new std::vector< std::vector < Node* > >(SIZE, std::vector<Node*>(SIZE, nullptr));
Board();
bool static isEmpty(const std::vector< std::vector < Node* > >& board);
std::vector< std::vector < Node* > > static play(std::pair<int, int> cord, std::vector< std::vector < Node* > > *board);
std::vector< std::pair<int, int> > static getFrees(std::vector< std::vector < Node* > > board);
void static printBoard(std::vector< std::vector < Node* > > &board);
Node::STATES static calculateWinner(std::vector< std::vector < Node* > >& board);
bool static isFull(std::vector< std::vector < Node* > >& board);
};
#endif