A front-end JavaScript exercise where the user plays Rock-Paper-Scissors (RPS) against the computer.
RPS is a classic two player game. Each player chooses either rock, paper or scissors. The items are compared and whichever player chooses the more powerful item wins. The possible outcomes are:
- Scissors cuts paper
- Paper covers rock
- Rock crushes scissors
- If there's a tie, the game ends in a draw
And then, RPS evolved to Rock-Paper-Scissors-Lizard-Spock
I invented this game (with Karen Bryla) because it seems that when you know someone
well enough, 75-80% of any Rock-Paper-Scissors games you play with that person end
up in a tie. Well, here is a slight variation that reduces that probability.Sam Kass on Rock-Paper-Scissors-Lizard-Spock
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
- Get Javascript written so one can actually play the game
- Make the code responsive so the game can be played on large, medium and small devices
- Possible enhancement - allow choice of playing against the computer, or two players head to head
- If playing head to head, prompt for, and display, user's names
- I was originally going to use font awesome icons but had a difficult time sizing them. Then I found a link to convert font awesome to png. So instead of calling FA, I genned the images I needed.