This repository contains a simple implementation of the classic Tic-Tac-Toe game using JavaScript, HTML, and CSS. The game allows two players to take turns placing their respective symbols (X and O) on a 3x3 grid. The first player to align three of their symbols either horizontally, vertically, or diagonally wins the game.
Youtube Tutorial Link: https://youtu.be/GUOisFZP_Fg
Live Preview: https://constgenius.github.io/TicTacToe_JavaScript/
- Clone or download the repository to your local machine.
- Open the index.html file in your web browser.
- The game will start, and you will see a 3x3 grid displayed on the screen.
- Player 1 will be assigned the symbol "X," and Player 2 will be assigned the symbol "O."
- The players take turns clicking on an empty cell in the grid to place their symbol.
- The game will automatically detect a win or draw condition and display the result accordingly.
- To start a new game, simply click on Restart or refresh the page.
- Simple and intuitive user interface.
- Real-time feedback on the game status (win, draw, or ongoing).
- Automatic detection of winning conditions.
- Easy to play and understand for all ages.
- index.html: The main HTML file containing the game board and user interface.
- styles.css: A CSS file to style the appearance of the game.
- script.js: The JavaScript file containing the game logic and functionality.
- JavaScript: The game's logic is written in JavaScript for handling user interactions and determining the game's outcome.
- HTML: The structure of the game is defined using HTML elements.
- CSS: The game's visual styling is accomplished with CSS.
Contributions to this project are welcome! If you find any bugs or have ideas for improvements, please create an issue or submit a pull request.