#pragma once #include #include #include "Piece.h" using namespace std; struct moves { int row; int column; string 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(); void setValidTrue(); bool isValid(); bool isPiece(int r, int c); void isTaken(int r, int c); Piece* getPiece(int r, int c); vector getXPieces() const { return xpieces; } vector getOPieces() const { return opieces; } moves parse(string input); char getTurn() { return turn; } bool isGameOver(); void changeTurns(); void displayBoard(); string boardToString(); int charToIntColumn(char input); char intToCharColumn(int input); void move(string inputMove); void move(moves jugada); void moveWOPrint(moves jugada); 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, char min); };