-
Notifications
You must be signed in to change notification settings - Fork 0
/
Board.h
53 lines (37 loc) · 1.05 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
#ifndef BOARD_H
#define BOARD_H
#include "GLOBALS.h"
class Board
{
vector<char> cells;
bool isWhiteTurn{true};
bool isCustomized{false};
public:
// Init to empty
Board();
// Init to std board. n's value doesn't matter here.
Board(int n);
// Gets piece by cells index
char &piece(int idx);
// Gets piece by row and column numbers
char &piece(int row, int col);
// Clears board (for setup)
void clear();
// Prints board (before move)
void printBoard();
// Sets the graphics field to true or false
void setGraphic(bool graphic);
// Sets the isWhiteTurn field to true or false
void setWhiteTurn(bool isWhite);
// Sets the isCustomized field to true or false
void setCustomized(bool isCustom);
// returns the value of isCustomized
bool checkCustomized();
// Gets isWhiteTurn field
bool isBoardWhiteTurn();
// // Prints board graphically (before move)
// void printGraphicBoard();
// // Prints board (before move)
// void printBoard();
};
#endif