TicTacToe (XO) game developed using C++ ... containing a nightmare game-mode which is an implementation of MiniMax Algorithm which is a challenging mode (can you beat the computer?). Additionally, there is an easy-mode and finally player versus player mode (2 players mode).
TicTacToe game presented is divided into two parts:
1. Gameplay Functions: contain the functions that will be used throughout the GUI components, which will be driving the game's logic.
2. GUI Representation & Components: the GUI of the game.
Moreover, there are 2 fundamental game modes:
- Player Mode: you will be playing versus another player (local) by choosing whether to play as X or O and the other player will be automatically chosen with the remaining.
- Computer Mode: you will be playing versus the computer and to be mentioned there are 2 levels ... easy-mode and nightmare-mode.
Note that the nightmare game-mode is implemented using MiniMax Algorithm therefore it's practically unbeatable.
ℹ️ MiniMax Algorithm: which is a popular decision-making algorithm used in game theory and artificial intelligence (AI). The algorithm is used to determine the best possible move by recursively exploring the game tree and generating a search tree (based on the decision score), which represents all possible future moves and outcomes. The algorithm then backtracks up the search tree, propagating the scores until it reaches the root of the tree, and the best move is determined.
Simulation video illustrating the game's operation and GUI ...
Note that X always starts the match.
TicTacToe.Simulation.mp4
Note it's recommended to install .NET Framework 4.7.2 Link: - https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net472-developer-pack-offline-installer - if you get error while trying to open the MyForm GUI File in the visual studio project ...