This project is a simple Rock-Paper-Scissors game that uses hand detection to interpret the player's move in real-time. The game includes an AI opponent, and the player competes against the AI with hand gestures representing rock, paper, or scissors.
- Hand detection using OpenCV and the cvzone library.
- Real-time interaction with the camera to capture the player's hand gestures.
- AI opponent with randomly generated moves.
- Game timer for each round.
- Score tracking to keep a record of player vs AI wins.
-
Clone My Repo to Your local machine:
-
Install the libraries
pip install opencv-python pip install cvzone pip install mediapipe
-
Run the Game:
python rock_paper_scissors.py
- Launch the game by running the script.
- Press 's' to start the game and begin hand detection.
- Show your hand gesture to the camera, and the AI will generate a random move.
- The result will be displayed on the screen, and the score will be updated accordingly.
- Press 'q' to quit the game.
- Press 'r' to restart the game.