The objective is to create a game that plays Tic-tac-toe optimally against the player no matter if the player starts first or second.
- The player can choose if he starts first or second.
- The game should display the current state.
- The game should display who is the winner.
- The program should play optimally against the opponent.
The program uses the algorithm Min-Max with Alpha-Beta pruning to play the game. When the game is started the user chooses if he wants to play first or second. According to that the program adapts and chooses the best move.
- Build it using
make
- Run
./main
- Initially the program asks the user if he wants to start first.
- Displays current state.
- Displays who won the game or 'Draw' in case of draw.