3x3 grid with clickable cells for X and O moves
Displays current player's turn (X or O)
Automatically detects wins or draws and displays result
Allows players to start a new game instantly
Pops up to show game outcome (win or draw)
Playable on both desktop and mobile devices
Tic Tac Toe, also known as Noughts and Crosses, is a classic paper-and-pencil game for two players. The game originated in ancient Egypt around 1300 BCE. Players take turns marking X or O in a 3x3 grid, aiming to place three of their marks in a horizontal, vertical, or diagonal row. Despite its simple rules, Tic Tac Toe has been the subject of mathematical analysis and is considered a solved game, meaning that with perfect play, the game will always end in a draw.
The win condition in Tic Tac Toe is determined by checking eight possible winning combinations: three horizontal rows, three vertical columns, and two diagonals. After each move, the game checks if the current player has completed any of these combinations. A draw is declared when all nine cells are filled without any player achieving a winning combination.