strategy
At its core, this version of Tic-Tac-Toe follows the traditional rules. The game is played on a 3x3 grid where two players, represented by 'X' and 'O', take turns placing their marks in empty cells. The goal is to be the first player to align three of their marks horizontally, vertically, or diagonally. However, the twist in this version is that the user competes against a smart AI opponent that uses a minimax algorithm to make optimal moves. This makes the game more challenging, ensuring the AI opponent plays at a near-perfect level. The game begins with a simple start menu, where players can press a button to begin their match. Players always start as 'X', and after each move, the computer makes its counter-move as 'O'. If a player wins, the game celebrates their victory with a winning animation and congratulatory sound effects. A loss will trigger a defeat message and offer the player a chance to try again by restarting the game.