This repository contains a Tic-Tac-Toe game built using vanilla JavaScript. The game provides a classic 3x3 grid where players take turns to place their marks (X or O) and aim to achieve a winning combination. It offers a simple and intuitive interface for an enjoyable gaming experience.
- Two-player mode: Play against a friend locally.
- Simple and intuitive user interface.
- Highlights the winning combination when a player wins.
- Option to reset the game and start a new round.
- Ability to change/update player names other than X or O.
- Clone the repository to your local machine using the following command:
git clone https://github.com/nomaanulhasan/JavaScript-Tic-Tac-Toe.git
-
Open the
index.html
file in your preferred web browser. -
Play the game by taking turns with your opponent. Click on an empty cell to place your mark (X or O).
-
To change/update player names, simply add your names in the input fields placed over game board.
-
The game will automatically detect a winning combination and highlight it when a player wins. If there is a tie, the game will end in a draw.
-
To start a new round, click on the restart button.
Contributions to the project are welcome. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Ensure that your contributions align with the coding style and conventions used in the project.
This project is licensed under the MIT License.
The Tic-Tac-Toe application is inspired by youtube tutorials by WebDevSimplified. I am very thankful to WebDevSimplified for the following resource: