/rock-paper-scissors

Rock, paper, scissors game initially, refactored to be rock, paper, scissors, lizard, Spock. Made with vanilla JS, HTML and SCSS

Primary LanguageJavaScript

Rock, Paper, Scissors (Lizard and Spock!)

This is a checkpoint challenge I've done with @SchoolOfCode, where the user can play a simple game of Rock, Paper, Scissors. I've refactored this game to improve JavaScript, implement Sass and add 2 more options: Lizard and Spock (Yes, the game that is played in 'The Big Bang Theory'!)

DEMO

Login Game

How to Play

  • "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
  • (and as it always has) Rock crushes Scissors"

Learnt:

  • document.querySelector()
  • document.querySelectorAll()
  • document.getElementById()
  • element.innerHTML
  • element.addEventListener()
  • event.target.innerText
  • Math.random()
  • if() else if() else

Refactoring

  • Changed from CSS to SASS
  • Changed design to something more modern-looking
  • Improved JavaScript