This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
breakthroughpine64backup/Board.h
2015-10-27 11:31:44 -05:00

50 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;
vector<Piece*> pieces;
//char boardArray [8][8];
char turn = 'O';
public:
Board();
bool isPiece(int r, int c);
Piece* getPiece(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);
};