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
Alexander Huddleston 37bbd43b84 Updating Branches.
2015-10-28 15:19:53 -05:00

58 lines
1.4 KiB
C++

#pragma once
#include <iostream>
#include <vector>
#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<Piece*> xpieces;
vector<Piece*> opieces;
vector<Piece*> 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<Piece*> getXPieces() const { return xpieces; }
vector<Piece*> getOPieces() const { return opieces; }
char getTurnPls() const { return turn; }
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 undo(Board& tablero);
void interpret(string input, Board& tablero);
void snapshot(vector<Board>& inputVec, Board inputBoard);
int evaluate(char max, char min);
};