Skip to content

FarisShamsudeen/multictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multic-Tac-Toe: Multiplayer JavaScript Game 🎮

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.

Table of Contents 📚

Description 💡

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.

Features 🌟

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

Tech Stack 🛠️

Frontend:

  • HTML: Structuring the layout 🏗️.
  • CSS: Styling the game board 🎨.
  • JavaScript: Game logic, player interactions, and board updates 🔥.

How to Play 🎮

  1. Open the project in your browser 🌐.
  2. Player 1 is assigned 'X' and Player 2 is assigned 'O' ❌⭕.
  3. Players take turns clicking on the empty cells of the 3x3 grid 🖱️.
  4. The game ends when one player aligns three marks in a row, column, or diagonal 🎯.
  5. If all cells are filled and there’s no winner, the game will end in a draw ⚖️.
  6. Click the Restart button to play again after the game ends 🔄.

Installation ⚙️

To run the game locally:

  1. Clone the repository:
    git clone https://github.com/your-username/multic-tac-toe.git
  2. Navigate to the project directory:
    cd multic-tac-toe
  3. Open the index.html file in your browser to start playing the game 🌍.

License 📜

Use it however you want bro 😊