This is a simple Tic Tac Toe game implemented using HTML, CSS, and JavaScript. It features a two-player mode and basic interactive gameplay.
- Enter the names of Player 1 and Player 2 in the provided input fields.
- Click the "Start Game" button to begin the game.
- Players take turns clicking on the grid to place their marks (X or O).
- The first player to align three marks horizontally, vertically, or diagonally wins the game.
- If all spaces are filled without a winner, the game ends in a draw.
- HTML
- CSS
- JavaScript
- Dynamic player name input and display
- Interactive gameplay with alternating turns
- Automatic win and draw detection
- Reset button to start a new game
The project consists of the following files:
index.html
: Contains the structure and layout of the game.style.css
: Contains the styles for the game elements.script.js
: Contains the JavaScript code for game logic and functionality.