Update Board.h

This commit is contained in:
Brandon Jackson 2015-10-27 21:52:09 -05:00
parent 934a28bec7
commit 30af60d193

25
Board.h
View file

@ -2,12 +2,13 @@
#include <iostream>
#include <vector>
#include "Piece.h"
using namespace std;
struct moves {
int row;
char column;
int column;
string moveType;
moves(int linea, int columna, string m) {
@ -18,29 +19,39 @@ struct moves {
};
class Board {
char boardArray [8][8];
vector<Piece*> xpieces;
vector<Piece*> opieces;
vector<Piece*> pieces;
char turn = 'O';
bool valid = false;
public:
Board();
char elementAt(int r, int k) { return boardArray[r][k]; }
void modifyAt(int r, int k, char input) { boardArray[r][k] = input; }
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<Piece*> getXPieces() const { return xpieces; }
vector<Piece*> 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<moves> viewPossibleMoves();
string myToUpper(string input);
void displayPossibleMoves(vector<moves> input);
void undo(Board& tablero);
void interpret(string input, Board& tablero);
void snapshot(vector<Board>& inputVec, Board inputBoard);
void easyAI();
string boardToString();
int evaluate(char max, char min);
};