Department of Computer Engineering, Faculty of Engineering, University of Peradeniya
Batch: E/21
This project is an extension of the classic Rock Paper Scissors game, adding two new gestures, Lizard and Spock, to increase complexity. The game is implemented using an Arduino and includes hardware components like LEDs, push buttons, and a piezo buzzer.
- Rock crushes Scissors
- Scissors cuts Paper
- Paper covers Rock
- Rock crushes Lizard
- Lizard poisons Spock
- Spock smashes Scissors
- Scissors decapitates Lizard
- Lizard eats Paper
- Paper disproves Spock
- Spock vaporizes Rock
You will compete against the computer for seven rounds. The game tracks your choices and the computer’s, using LEDs to display the scores.
- Arduino UNO
- 10 LEDs (for displaying scores and the computer’s choices)
- Piezo buzzer (for signaling game events)
- 6 Push buttons (for player input and starting/ending the game)
- Breadboard, resistors, jumper wires for circuit construction
- Real-Time Player vs. Computer Rounds: You play against the computer in seven rounds.
- Score Display with LEDs: Both player and computer scores are shown with LEDs in binary form.
- Timed Input Selection: A 3-second window is provided for the player to input their gesture using push buttons.
- Buzzer Notifications: Different tones to indicate the start, end, and round results.
- Serial Monitor: The game summary and current round details are displayed via the Arduino serial monitor.
- Game End Indication: After 7 rounds, all LEDs blink, and a distinct buzzer sound plays to indicate the game’s end.
You can find the circuit diagram in the schematics/
folder or view it online here.
- Start the Game: Press the "Start" button to begin the game.
- Choose a Gesture: Use one of the five buttons to choose Rock, Paper, Scissors, Lizard, or Spock.
- Computer Chooses: After you make your selection, the computer will randomly choose one of the five gestures, and the result will be displayed using LEDs.
- Track the Score: The scores will update after each round and can be viewed on the LED displays.
- End the Game: After 7 rounds, the game ends automatically, or you can end it manually by pressing the "End" button.
- Clone the Repository:
git clone [https://github.com/yourusername/rock-paper-scissors-lizard-spock.git](https://github.com/Ganathipan/GP-106-Com-Project)
- Upload Code to Arduino: Open the
.ino
file in Arduino IDE and upload it to your Arduino UNO board. - Build the Circuit: Follow the provided circuit diagram to set up the hardware.
- Start Playing: Press the "Start" button to begin playing the game.