The Tic Tac Toe game is a classic two-player game played on a 3x3 grid. The objective of the game is to be the first player to form a horizontal, vertical, or diagonal line with their respective symbol (usually 'X' or 'O').
-
Interactive Gameplay: The game provides an interactive interface where two players can take turns making their moves.
-
Player Turns: The game alternates between the players, allowing each player to place their symbol on an empty cell of the grid.
-
Win Detection: The game detects and declares a winner when a player successfully forms a line of their symbols.
-
Draw Detection: If all cells are filled and no player has formed a line, the game recognizes a draw and ends the game.
-
Restart Option: After the game ends, players have the option to restart and play again.
To play the Tic Tac Toe game, follow these steps:
-
Clone the repository:
git clone https://github.com/abokmadaki/tic-tac-toe.git
-
Open the game folder:
cd tic-tac-toe
-
Open the game in a web browser:
index.html
-
Play the game by clicking on the cells of the grid to place your symbols and follow the game rules.
-
Start the Game: Open the game in a web browser by opening
index.html
. -
Player Turns: The game will prompt the first player to make a move. Click on an empty cell in the grid to place your symbol ('X' or 'O').
-
Win Detection: The game will automatically detect when a player forms a line with their symbols horizontally, vertically, or diagonally. The game will display a message declaring the winner.
-
Draw Detection: If all cells are filled and no player forms a line, the game will declare a draw.
-
Restart the Game: After the game ends, players have the option to restart and play again by clicking on a restart button or refreshing the web page.
Contributions are welcome! If you want to contribute to the Tic Tac Toe game, please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/new-feature
. -
Make your changes and commit them:
git commit -m 'Add new feature'
. -
Push to the branch:
git push origin feature/new-feature
. -
Open a pull request on GitHub.
Please ensure that your code follows the project's coding conventions and includes appropriate documentation.
This project is licensed under the MIT License.