Skip to content

KunalSingh5431/TIC-TAC-TOE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 TIC-TAC-TOE Game

Welcome to the TIC-TAC-TOE game! This is an interactive and simple implementation of the classic game with an option to play against another player or challenge an AI opponent. The game is developed using JavaScript for the frontend, providing an exciting experience whether you're playing solo or with a friend.

Tic-Tac-Toe

🗝️ Features

  • Player vs Player: Play with another human player on the same device.
  • Player vs AI: Play against an AI opponent with random moves.
  • Interactive UI: Beautiful and user-friendly interface for an engaging experience.
  • Game Mode Selection: Choose between single-player or two-player mode.
  • Reset Functionality: Reset the game board at any time.

🤖 Tech Stack

  • Frontend Language: JavaScript, HTML, CSS
  • Backend Language: Python
  • Backend Framework: Flask
  • AI Algorithm: Minimax Algorithm (random move selection)

▶️ Installation

To run the game locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/KunalSingh5431/TIC-TAC-TOE.git
    cd TIC-TAC-TOE
  2. Open the game: Open index.html in any browser to play the game. No additional installations are required.

🖥️ How to Play

  1. Game Modes:

    • Player vs Player: Two players take turns to place their marks (X or O) on the board.
    • Player vs AI: Player 1 (X) competes against the AI (O). The AI selects random moves.
  2. Gameplay:

    • The game is played on a 3x3 grid.
    • Player 1 is X and Player 2 (or the AI) is O. Players take turns marking empty squares.
    • The first player to align 3 marks in a row (up, down, across, or diagonally) wins.
    • If all squares are filled and no player wins, it’s a draw.
  3. Starting the Game:

    • Select the game mode: Player vs Player or Player vs AI.
    • Enter player names (if playing Player vs Player).
    • Press the "Start Game" button to begin.
  4. Resetting the Game:

    • Use the "Reset Board" button to reset the board for a new game.

🅰️ AI Algorithm

The AI opponent in single-player mode uses random moves to make its decisions. While basic, it provides a challenging opponent for casual gameplay.

☑️ Contributing

Contributions are welcome! If you have any improvements or suggestions, feel free to fork the repository and create a pull request.

🪪 License

This project is licensed under the MIT License. See the LICENSE file for details.

📍Contact

For any questions or feedback, feel free to reach out:


Enjoy playing TIC-TAC-TOE with AI! 🛩️

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published