Update Board.h
This commit is contained in:
parent
6355f7ad56
commit
a4a857ce26
1 changed files with 33 additions and 2 deletions
35
Board.h
35
Board.h
|
@ -17,9 +17,39 @@ struct moves {
|
|||
}
|
||||
};
|
||||
|
||||
struct simpleBoard{
|
||||
|
||||
char boardStamp [8][8];
|
||||
|
||||
char elementAt(int r, int k)
|
||||
{
|
||||
return boardStamp[r][k];
|
||||
}
|
||||
|
||||
void modifyAt(int r, int k, char c)
|
||||
{
|
||||
boardStamp[r][k] = c;
|
||||
}
|
||||
|
||||
void display()
|
||||
{
|
||||
for (int r = 0; r < 8; ++r)
|
||||
{
|
||||
cout<<'\n';
|
||||
|
||||
for (int k = 0; k < 8; ++k)
|
||||
{
|
||||
cout<<boardStamp[r][k]<<" ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class Board {
|
||||
char boardArray [8][8];
|
||||
char turn = 'O';
|
||||
vector<simpleBoard> record;
|
||||
|
||||
public:
|
||||
Board();
|
||||
|
@ -38,9 +68,10 @@ public:
|
|||
vector<moves> viewPossibleMoves();
|
||||
string myToUpper(string input);
|
||||
void displayPossibleMoves(vector<moves> input);
|
||||
void undo(Board& tablero);
|
||||
void undo();
|
||||
void interpret(string input, Board& tablero);
|
||||
void snapshot(vector<Board>& inputVec, Board inputBoard);
|
||||
void snapshot();
|
||||
void easyAI();
|
||||
string boardToString();
|
||||
void displayRecord();
|
||||
};
|
||||
|
|
Reference in a new issue