-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathboard.cpp
71 lines (55 loc) · 1.37 KB
/
board.cpp
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
68
69
#include "board.h"
Board::Board() {
}
Board::Board(const string &fen) {
}
void Board::printBoard_as_FENstring(ostream &os) const {
}
PieceType Board::atLocation(int row, int col) {
return data[row][col];
}
void Board::prettyPrintBoard(ostream &os) const {
os << endl;
for (int row = NUM_ROWS - 1; row >= 0; row--) {
os << " +---+---+---+---+---+---+---+"
<< endl
<< " ";
for (int col = 0; col < NUM_COLS; col++) {
os << " | " ;
if ( data[row][col] == Player1)
os << PLAYER1_TOKEN;
else if (data[row][col] == Player2)
os << PLAYER2_TOKEN;
else
os << EMPTY_TOKEN;
}
os << " |" << endl;
}
os << " +---+---+---+---+---+---+---+" << endl
<<" col 1 2 3 4 5 6 7" << endl;
return;
}
int Board::toMove() const {
return 1;
}
Result Board::makeMove(int col) {
return NoResult;
}
int Board::getFirstFreeRow(int col) const {
return NUM_ROWS;
}
PieceType Board::updateToMove() {
return Player1;
}
bool Board::isBoardFull() const {
return false;
}
bool Board::inBounds(int row, int col) const {
return false;
}
int Board::piecesInDirection(int row, int col, int dRow, int dCol) const {
return 0;
}
bool Board::isWin(int row, int col) const {
return false;
}