#pragma once #include #include #include "Piece.h" using namespace std; struct moves { int row; int column; string moveType; moves() { row = -1; column = -1; moveType = ""; } moves(int linea, int columna, string m) { row = linea; column = columna; moveType = m; } }; class Board { vector xpieces; vector opieces; vector pieces; vector record; bool valid, xtaken, otaken; char turn = 'O'; public: Board(); Board(const Board& b); vector getRecord() const{ return record; } void setValidFalse(){ valid = false; } void setValidTrue(){ valid = true; } bool isValid(){ return valid; } bool isPiece(int r, int c); Piece* getPiece(int r, int c); void isTaken(int r, int c); bool checkTaken(char c); vector getPieces() const { return pieces; } vector getTypePieces(char type) const; char getTurn() const { return turn; } bool isGameOver(); char whoWon(); void changeTurns(); void resetTaken(); void displayBoard(); string boardToString(); Board move(moves m); bool isThisMovePossible(int r, int c, string moveType); vector viewPossibleMoves(); string myToUpper(string input); Board* undo(); void snapshot(vector& inputVec, Board inputBoard); int evaluate(char max, char min); };