#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; char turn = 'O'; bool valid = false; public: Board(); Board(const Board& b); 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); vector getXPieces() const { return xpieces; } vector getOPieces() const { return opieces; } char getTurnPls() const { return turn; } moves parse(string input); char getTurn() { return turn; } bool isGameOver(); string whoWon(); void changeTurns(); void displayBoard(); string boardToString(); int charToIntColumn(char input); char intToCharColumn(int input); void move(string inputMove); Board move(moves m); bool isThisMovePossible(int r, int c, string moveType); vector viewPossibleMoves(); string myToUpper(string input); void undo(Board& tablero); void interpret(string input, Board& tablero); void snapshot(vector& inputVec, Board inputBoard); int evaluate(char max); };