Skip to content

abhigyank/RPSLS-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Rock, Paper, Scissors, Lizard, Spock in Javascript

Rock, Paper, Scissors, Lizard, Spock (RPSLS) is a variant of the all time famous game Rock, Paper, Scissors. It was introduced in TV-Series The Big Bang Theory. According to Sheldon(the character introduces this game in The Big Bang Theory), adding two more options reduces the probability that the game will result in a tie.

##The Rules Scissors cut paper. Paper covers rock. Rock crushes lizard. Lizard poisons Spock. Spock smashes scissors. Scissors decapitate lizard. Lizard eats paper. Paper disproves Spock. Spock vaporizes rock. Rock crushes scissors.

##The Program The key idea of this program is to generate random numbers in the range (1-5) and equate them to strings "ROCK", "PAPER", "SCISSORS", "LIZARD", and "SPOCK" to numbers respectively and alot this random string to the computer's choice. It is then compared with the user's choice and declare a winner according to the rules above.

About

Rock Paper Scissor Lizard Spock game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published