#pragma once #include #include using namespace std; // Need to rethink struct Move when gravity toggling // is implemented in the future. For now, tokens placed // on the board fall to the lowest unoccupied height // for a given pin (uniquely identified by row and column). struct Move { int row, col; }; // GameBoard class definition class GameBoard { public: GameBoard(); bool isValid(int r, int c) const; bool isValid(int r, int c, int z) const; // future use with gravity toggling void updateBoard(int r, int c, int piece); void updateBoard(int r, int c, int z, int piece); // future use with gravity toggling void undoMove(int r, int c); void undoMove(int r, int c, int z); // future use with gravity toggling bool movesLeft() const; int checkWinner() const; int evaluateBoard() const; int minimax(int depth, int player, int alpha, int beta, int maxDepth); Move findBestMove(int depth, int player); void computerMove(int depth); void displayBoard() const; private: array, 4>, 4> board; vector>> winningLines; void findWinningLines(); };