-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
38 lines (33 loc) · 1.17 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Create a browser-based game of Rock Paper Scissors
create user input string let variable
aka playerSelection
create computer play string let variable
aka computerSelection
create win string let variable
create lose string let variable
create win statement string let variable
create moves array constant
function playerPlay()
add string to prompt function
show prompt to user
wait for input from user
store input from user in player play variable
Sanitize
Verify
Lowercase
return player play variable
function computerPlay()
create random int variable storing from 1 - 3
generate random moves array item
store random moves array item in computer play variable
return computer play variable
function playRound(playerSelection, computerSelection)
// stuff //
return win statement string let variable
function game()
store the value from playerPlay() into playerSelection
store the value from computerPlay() into computerSelection
console.log playRound(playerSelection, computerSelection)
repeat all of the above five times
tally winner after five rounds
console.log winner after five rounds