Tree-Based Tic Tac Toe Using Minimax

Hi guys,
I am doing an assignment that requires me to use tree nodes and minimax algorithm to make a tic tac toe game. It would be player vs the computer. Each nodes should represent each possible boards that can be played. Currently, I have no idea what to do. Can anyone point me to the right direction? Anything helps, thanks.


Node setup:


struct GameNode
{
char board[3][3] = { {'0', '1' ,'2' }, {'3', '4', '5'}, {'6', '7', '8'} };

vector<GameNode *> succ;

GameNode (char val)
{

}
};
Topic archived. No new replies allowed.