49 lines
No EOL
1.1 KiB
C++
Executable file
49 lines
No EOL
1.1 KiB
C++
Executable file
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include "Piece.h"
|
|
|
|
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 {
|
|
//vector<vector<char>> boardArray;
|
|
vector<Piece*> xpieces;
|
|
vector<Piece*> opieces;
|
|
//char boardArray [8][8];
|
|
char turn = 'O';
|
|
|
|
public:
|
|
Board();
|
|
bool elemInXs(int r, int c);
|
|
bool elemInOs(int r, int c);
|
|
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);
|
|
void moveWOPrint(moves jugada);
|
|
//bool isThisMovePossible(int r, int c, string moveType);
|
|
//vector<moves> viewPossibleMoves();
|
|
string myToUpper(string input);
|
|
void undo(Board& tablero);
|
|
void interpret(string input, Board& tablero);
|
|
void snapshot(vector<Board>& inputVec, Board inputBoard);
|
|
int evaluate(char max, char min);
|
|
}; |