Welcome to the Rock🪨 Paper📄 Scissors✂️ game with hand tracking! This simple yet interactive game allows you to play Rock Paper Scissors against an AI opponent using hand gestures.
- Python 3.x
- OpenCV
- cvzone
- Mediapipe for Hand Detection
Pycharm by JetBrains (recommended)
You need to import cvzone and mediapipe library at your machine in this directory
- Run the script.
- Press 's' to start the game.
- Use your hand gestures to make a move (rock, paper, or scissors).
- Rock: Fist with all fingers closed.
- Paper: Open hand with all fingers extended.
- Scissors: Fist with index and middle fingers extended.
- The AI will also make a random move.
- The winner of each round will be displayed based on Rock Paper Scissors rules.
- Press 'b' to exit the game at any time.
- Press 's' to start a new game.
- Press 'b' to exit the game and view the final score.
- The game features a timer for each round, allowing fair gameplay.
- Hand tracking is performed using the Mediapipe library.
- The cvzone library is used for overlaying images on the game background.
- The AI's moves are randomly generated.
- Scores are displayed on the screen, showing both the AI and player scores.
rock.paper.scissor.mp4
Feel free to explore, modify, and enhance the game as you like! Enjoy playing Rock Paper Scissors with a twist of hand tracking. If you encounter any issues or have suggestions for improvement, please let me know.
Stone✊ Paper🖐️ Scissor✌️ !
Have fun gaming! 🎮