Skip to content

ShahiCodes/Tic-Tac-Toe-

Repository files navigation

Tic-Tac-Toe Game with React 🎮

This repository contains the source code for a modern and responsive Tic-Tac-Toe game built using React, Vite bundler, and styled with Tailwind CSS. The game includes two exciting modes: Player vs Player (PvP) and Player vs Bot.

Features ✨

  • Two Game Modes:

    • PvP Mode: Play with a friend on the same device.
    • Player vs Bot Mode: Play against an AI bot with customizable difficulty levels.
  • Responsive Design: The game is fully responsive and works seamlessly on desktop and mobile devices.

  • Beautiful UI/UX: The interface is intuitive, dynamic, and visually appealing, crafted with Tailwind CSS.

Bot AI: In Player vs Bot mode, the bot uses a simple algorithm to make moves and provide a challenging experience.

  • Difficulty Levels for Bot: Choose from three difficulty levels for the bot – Easy, Medium, and Hard, to adjust the bot's challenge.

  • Game Reset and Mode Switching: Easily reset the game or switch between PvP and Player vs Bot modes with a button click.

Tech Stack ⚙️

  • React: JavaScript library for building the user interface.
  • Vite: Next-generation front-end build tool and bundler.
  • Tailwind CSS: Utility-first CSS framework for fast and responsive styling.

Installation 🛠️

  1. Clone the repository:

    git clone https://github.com/ShahiCodes/Tic-Tac-Toe.git
    cd tic-tac-toe
  2. Install dependencies:

    npm install
  3. Run the app locally:

    npm run dev

    Visit http://localhost:3000 in your browser to play the game.

Gameplay 🎮

  • Choose between PvP Mode and Player vs Bot Mode from the main menu.
  • In PvP Mode, two players take turns to place their marks (X or O) on a 3x3 grid, aiming to get three of their marks in a row (horizontally, vertically, or diagonally).
  • In Player vs Bot Mode, the player competes against an AI bot, with the bot making strategic moves based on its difficulty setting.

Live Link 🌐

You can play the game live here: Tic-Tac-Toe Game

Contributing 🤝

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature-name).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request.

License 📜

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

Acknowledgements 👏

  • React for building the user interface.
  • Vite for fast and efficient bundling.
  • Tailwind CSS for designing the responsive layout.

Feel free to customize the link to your repository and any other details you want to add.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors