37 lines
No EOL
751 B
C++
Executable file
37 lines
No EOL
751 B
C++
Executable file
#pragma once
|
|
|
|
using namespace std;
|
|
|
|
struct moves {
|
|
int row;
|
|
char column;
|
|
string moveType;
|
|
|
|
moves(int linea, int columna, string m) {
|
|
row = linea;
|
|
column = columna;
|
|
moveType = m;
|
|
}
|
|
};
|
|
|
|
class Board {
|
|
char boardArray [8][8];
|
|
char turn = 'O';
|
|
|
|
public:
|
|
Board();
|
|
moves parse(string input);
|
|
char getTurn() { return turn; }
|
|
bool isGameOver();
|
|
void changeTurns();
|
|
void displayBoard();
|
|
int charToIntColumn(char input);
|
|
char intToCharColumn(int input);
|
|
void move(string inputMove);
|
|
void move(moves jugada);
|
|
bool isThisMovePossible(int r, int c, string moveType);
|
|
vector<moves> viewPossibleMoves();
|
|
string myToUpper(string input);
|
|
void displayPossibleMoves(vector<moves> input);
|
|
void easyAI();
|
|
}; |