Keyboard shortcuts

Press โ† or โ†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

โœŠ๐Ÿ“„โœ‚๏ธ๐ŸฆŽ๐Ÿ–– Rock-Paper-Scissors-Lizard-Spock (Go Edition)

A terminal-based game of Rock, Paper, Scissors, Lizard, Spock โ€” written entirely in Go.
Inspired by The Big Bang Theory and designed to reduce the number of ties from the classic Rock-Paper-Scissors.


๐ŸŽฎ Game Modes

This version supports:

  • Classic Mode: Rock-Paper-Scissors
  • Extended Mode: Rock-Paper-Scissors-Lizard-Spock

The computer picks its move randomly, and you battle it out in the terminal.


๐Ÿงฉ Rules

As explained by Sheldon Cooper:

  • 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
  • Rock crushes Scissors

๐Ÿ“ธ ASCII Art

Each move comes with its own ASCII art for maximum nerd satisfaction:

Rock:      _______
        ---'   ____)
              (_____)
              (_____)
              (____)
        ---.__(___)

Paper:      _______
        ---'    ____)____
                   ______)
                  _______)
                 _______)
        ---.__________)

โ€ฆand more for Scissors, Lizard, and Spock.


๐Ÿš€ How to Run

  1. Clone the repo:

    git clone https://github.com/yourusername/rpsls-go.git
    cd rpsls-go
    
  2. Run the game:

    go run main.go
    

๐Ÿ›  Features

  • Fully interactive terminal gameplay
  • Input validation (no more typos ruining your match)
  • Fun ASCII art for each move
  • Randomized computer opponent
  • Looping draw condition (keep going until there's a winner)

๐Ÿ“Œ Example Gameplay

Choose your move:
Rock
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)

Paper
     _______
---'    ____)____
           ______)
          _______)
         _______)
---.__________)

... (more ASCII moves) ...

Welcome to the game of Rock, Paper, Scissors, Lizard, Spock
Do you want to read the rules? [y/n]: y

Sheldon explains:
Scissors cuts Paper, Paper covers Rock, Rock crushes Lizard, ...

Enter your move (Rock, Paper, Scissors, Lizard, Spock): Spock
You chose: Spock
Computer chose: Lizard
You lost! Hahaha, you suck!

๐Ÿ“œ License

MIT License โ€” feel free to fork, modify, and enjoy.


๐Ÿ’ก Credits

  • Inspired by The Big Bang Theory
  • ASCII Art adapted from various open-source snippets