Skip to content

rishabh407/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic-Tac-Toe Game (Multiplayer + Computer Mode)

This is a web-based Tic-Tac-Toe game made using HTML, CSS, and JavaScript.
It includes two fun ways to play:

  • 👥 Multiplayer Mode: Two players can take turns on the same device.
  • 🤖 Computer Mode: Play against a smart computer using AI logic (Minimax).

🕹️ How to Play

➤ Multiplayer Mode

  • Open the file: multiplayer/multiplayer.html
  • Player 1 plays as O, Player 2 plays as X
  • Take turns to play, and try to win!

➤ Computer Mode

  • Open the file: computer/computer.html
  • You (the user) play as X
  • The computer plays as O using the minimax algorithm
  • The computer always makes the best possible move

📁 Folder Structure

Tic-Tac-Toe Game/ ├── gameinterface.html # Main menu / lobby ├── gameinterface.css # Styling for main menu ├── /multiplayer/ │ ├── multiplayer.html # Multiplayer game page │ ├── multiplayer.css # Styling for multiplayer mode │ └── multiplayer.js # JS logic for multiplayer ├── /computer/ │ ├── computer.html # AI game page │ ├── computer.css # Styling for computer mode │ └── computer.js # JS logic with minimax AI │ └── computer.html # Computer (AI) mode


✨ Features

  • Beautiful and clean UI
  • Multiplayer and Single Player (AI) modes
  • AI uses Minimax algorithm (perfect play)
  • Victory and draw detection
  • Reset and New Game support
  • Fully responsive and mobile-friendly

🛠 Built With

  • HTML5
  • CSS3
  • JavaScript (Vanilla)

👨‍💻 Author

Made with ❤️ by Rohit Sangral
🔗 GitHub: rishabh407
📁 Repo: Tic-Tac-Toe Game


📄 License

This project is open-source and available under the MIT License.

Releases

No releases published

Packages

 
 
 

Contributors