Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 2.18 KB

README.md

File metadata and controls

46 lines (32 loc) · 2.18 KB

Rock, Paper, Scissors, Lizard, Spock Game

Welcome to the Rock, Paper, Scissors, Lizard, Spock game - where you can challenge the one and only Sheldon Cooper in a battle of wits. Prepare for a laugh-worthy showdown with a dash of geekiness! Follow these instructions to play:

How to Play

  1. Type in your name and hit "Enter" Sheldon needs to know who he's up against!
  2. You'll get a shot at 5 epic rounds of play.
  3. Click on one of the game icons (Rock, Paper, Scissors, Lizard, or Spock) to make your move.
  4. Sheldon, being the computer genius that he is, will randomly select his move.
  5. The game will decide the round winner using these quirky rules:
    • 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
  6. Your and Sheldon's scores will update after each round.
  7. After 5 rounds, we'll declare the ultimate champion!

Code Shenanigans

Classes

Our code's got a sense of humor too! It uses two classes: Player and Game.

  • Player class creates player objects with fancy attributes like name and choice.
  • Game class manages the game's geeky logic - like figuring out who wins and making Sheldon pick random stuff.

Switcheroo Statements

We've got this "switch" thing going on to figure out the winner in each round. It's like the game is speaking in code! It checks all the possible combos (Rock, Paper, Scissors, Lizard, Spock), updates scores, and makes sure nobody's cheating.

Try-Catch-Finally Comedy

Sometimes, things get a bit wild when you make choices. The "try-catch-finally" block is our safety net. If you pick something crazy, it throws an error message but ensures that the show goes on with the "finally" block.

Reset Button (Because We All Need a Do-Over)

If you ever need a fresh start or a do-over, hit that "Reset" button. It's like a cosmic reset - 5 new rounds, scores back to zero, and Sheldon's memory wiped clean.

Get ready for a hilarious and brainy game of Rock, Paper, Scissors, Lizard, Spock! Who will emerge victorious? Let the games begin!