Welcome to Multic-Tac-Toe, a multiplayer version of the classic Tic-Tac-Toe game built with vanilla JavaScript! This project demonstrates my skills in building interactive games using HTML, CSS, and JavaScript.
Multic-Tac-Toe is a simple, yet exciting multiplayer game where two players can compete by taking turns to place their marks (X or O) on a 3x3 grid. The game ends when one player wins by aligning three of their marks in a row, column, or diagonal. If the grid fills up without a winner, the game results in a draw.
This project allows players to enjoy a competitive and interactive experience, and it features:
- Turn-based gameplay with alternating 'X' and 'O'.
- Real-time board updates after each move.
- Winning condition check to determine the winner.
- Draw condition if all cells are filled without a winner.
- Easy restart option after the game ends.
- Multiplayer: Two players can take turns playing 👫.
- Responsive UI: Simple and clean design that works across different devices 📱💻.
- Winning Logic: Checks for all possible winning combinations and draw conditions 🏆.
- Restart Functionality: The game resets instantly after a game is over 🔄.
Frontend:
- HTML: Structuring the layout 🏗️.
- CSS: Styling the game board 🎨.
- JavaScript: Game logic, player interactions, and board updates 🔥.
- Open the project in your browser 🌐.
- Player 1 is assigned 'X' and Player 2 is assigned 'O' ❌⭕.
- Players take turns clicking on the empty cells of the 3x3 grid 🖱️.
- The game ends when one player aligns three marks in a row, column, or diagonal 🎯.
- If all cells are filled and there’s no winner, the game will end in a draw ⚖️.
- Click the Restart button to play again after the game ends 🔄.
To run the game locally:
- Clone the repository:
git clone https://github.com/your-username/multic-tac-toe.git
- Navigate to the project directory:
cd multic-tac-toe
- Open the
index.html
file in your browser to start playing the game 🌍.
Use it however you want bro 😊