migueloop / SPSRL_React

spock scissors paper rock lizard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReactJS developer interview test:

Write a program that will play this game against the computer. The game should end once there is a winner. If the game is a tie then the program must make the user play again, until there is a winner.

Once there is a winner, the program (game) must end. When the program begins, a random number is created between 1 and 5.

These values will be used as follows:

  1. Rock

  2. Paper

  3. Scissors

  4. Lizard

  5. Spock

Use a menu to prompt the user for their choice, using the same values as above. The program should then display the computer’s choice and indicate who has won.

A winner is selected using the following rules:

  • Scissors cut paper

  • Paper covers rock

  • Rock crushes lizard

  • Lizard poisons Spock

  • Spock smashes (or melts) scissors

  • Scissors decapitate lizard

  • Lizard eats paper

  • Paper disproves Spock

  • Spock vaporizes rock

  • Rock breaks scissors

About

spock scissors paper rock lizard

License:MIT License


Languages

Language:JavaScript 92.6%Language:CSS 4.0%Language:HTML 3.5%