rock-paper-scissors

UCB Rock Paper Scissors Game

We enter R-P-S into the input (do while loop)

  • use Prompt to ask input of R, P, or S
  • validation check of input against array of correct inputs
  • generate the commputers choice
    • create a random number, convert to 0, 1, 2 (R, P, S)
  • alert to computer's choice
  • calculate if won, tied, or lost with conditional statements
    • create result message (string)
    • calculate/increment (new) stat
  • alert to state of if you won, tied, or lost (that round)
  • alert of overall stats
  • win or lose, ask if play again with confirm
  • if true, play again
    • (loop continues)
    • if false, exit app
      • (loop ends)
  • alert: final results - counting wins, ties, losses

Need variables:

  • Rock
  • Paper
  • Scissors

Random generator for computer R, P, S