English | 简体中文
Three versions of the classic game, from simplest to most advanced. All three are available as ready-to-run Windows programs on the Releases page.
| Folder | Version | Entry point | Windows download |
|---|---|---|---|
Rock_Paper_Scissors_Game_CLI/ |
Command line | CLI.py |
RockPaperScissors-CLI.exe |
Rock_Paper_Scissors_Game_GUI/ |
Tkinter window | GUI.py |
RockPaperScissors-GUI.exe |
Rock_Paper_Scissors_Game_hand/ |
Webcam hand-gesture game (OpenCV + MediaPipe) | main.py |
RockPaperScissors-Hand.exe |
The CLI and GUI versions need only Python 3 (the GUI uses the built-in tkinter).
python Rock_Paper_Scissors_Game_CLI/CLI.py
python Rock_Paper_Scissors_Game_GUI/GUI.pyThe hand-gesture version needs a webcam and the packages in requirements.txt:
pip install -r requirements.txt
python Rock_Paper_Scissors_Game_hand/main.pyPress d to play a round and q to quit. See Rock_Paper_Scissors_Game_hand/README.md for details. It reads the default camera (index 0).
Play against the computer using hand gestures captured through your webcam:
- Real-time rock / paper / scissors recognition with MediaPipe hand landmarks
- On-screen FPS counter
- Running statistics: wins, losses, total rounds and win percentage
pip install pyinstaller
pyinstaller --onefile --console --name RockPaperScissors-CLI Rock_Paper_Scissors_Game_CLI/CLI.py
pyinstaller --onefile --windowed --name RockPaperScissors-GUI Rock_Paper_Scissors_Game_GUI/GUI.py
pyinstaller --onefile --console --name RockPaperScissors-Hand --collect-data mediapipe --collect-binaries mediapipe ^
--exclude-module jax --exclude-module jaxlib --exclude-module scipy Rock_Paper_Scissors_Game_hand/main.pyMIT, see LICENSE.