TwixmixyJanet / rock-paper-scissors

UCB Rock Paper Scissors Game

Home Page:https://twixmixyjanet.github.io/rock-paper-scissors/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

UCB Rock Paper Scissors Game

https://twixmixyjanet.github.io/rock-paper-scissors/


Languages

Language:CSS 79.4%Language:JavaScript 13.4%Language:HTML 7.2%