Skip to content

voiwpro/GesturesTic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe with Hand Gesture Detection

Welcome to the Tic Tac Toe game that uses hand gesture detection to play! This project integrates computer vision with a classic game, allowing players to make moves using hand gestures detected via a webcam. scroll down for screenshots

🎮 Project Overview

This Tic Tac Toe game is built using Python, Pygame, and OpenCV with MediaPipe for hand gesture recognition. The game allows players to interact with the game board using hand gestures such as moving the cursor and placing an 'X' on the grid.

✨ Features

  • Hand Gesture Detection: Use hand gestures to navigate the game board and place your move.
  • Single Player Mode: Play against the computer.
  • Responsive UI: The game board and grid adjust based on hand gestures.
  • Computer Opponent: The computer will automatically make its move after the player's turn.
  • Restart Option: Play the game multiple times without restarting the application.

🛠️ Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/tic-tac-toe-gesture.git
    cd tic-tac-toe-gesture
  2. Install the required dependencies: Ensure you have Python installed. Then install the dependencies:

    pip install pygame opencv-python mediapipe
  3. Run the game:

    python main.py

🚀 Usage

  1. Start the game: Run the game using the python main.py command.
  2. Move the cursor: Use hand gestures to move the cursor across the grid.
  3. Place an 'X': Use the appropriate gesture to place your move.
  4. Computer Move: After your move, the computer will automatically make its move.
  5. Restart: After the game ends, click on 'Play Again' to restart the game or 'Quit' to exit.

🤖 Hand Gestures

  • Start Game: All fingers open.
  • Move Cursor: Move your hand left, right, up, or down.
  • Place 'X': Specific hand gesture as recognized by the system.

📝 Notes

  • Ensure your webcam is properly connected and functioning.
  • The game uses simple hand gestures; keep your hand within the frame of the webcam for accurate detection.
  • The game is optimized for single-player mode against the computer.

📚 Credits

  • Pygame: For creating the game interface.
  • OpenCV: For handling video capture and processing.
  • MediaPipe: For providing the hand detection model.

📄 License

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


Enjoy playing Tic Tac Toe with a futuristic twist! ScreenShots Main Menu Main Menu Main Menu Main Menu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages