Skip to content

nomaanulhasan/JavaScript-Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vanilla JavaScript Tic-Tac-Toe Game

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.

Features

  • 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.

Usage

  1. Clone the repository to your local machine using the following command:

git clone https://github.com/nomaanulhasan/JavaScript-Tic-Tac-Toe.git

  1. Open the index.html file in your preferred web browser.

  2. Play the game by taking turns with your opponent. Click on an empty cell to place your mark (X or O).

  3. To change/update player names, simply add your names in the input fields placed over game board.

  4. 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.

  5. To start a new round, click on the restart button.

Screenshot

Tic-Tac-Toe

Contributing

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.

License

This project is licensed under the MIT License.

Acknowledgements

The Tic-Tac-Toe application is inspired by youtube tutorials by WebDevSimplified. I am very thankful to WebDevSimplified for the following resource: