-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10-rock-paper-scissors.html
80 lines (52 loc) · 1.39 KB
/
10-rock-paper-scissors.html
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<title> Object Rock Paper Scissors </title>
<link rel="stylesheet" href="styles/10-rock-paper-scissors.css">
</head>
<body>
<p class="title">
Rock Paper Scissors
</p>
<button onclick="
pickComputerMove();
playerMove = 'rock';
updateMove(playerMove, computerMove);
PlayGame(playerMove);
" class="move-button">
<img src="images/rock-emoji.png" class="move-icon">
</button>
<button onclick="
pickComputerMove();
playerMove = 'paper';
updateMove(playerMove, computerMove);
PlayGame(playerMove);
" class="move-button">
<img src="images/paper-emoji.png" class="move-icon">
</button>
<button onclick="
pickComputerMove();
playerMove = 'scissors';
updateMove(playerMove, computerMove);
PlayGame(playerMove);
" class="move-button">
<img src="images/scissors-emoji.png" class="move-icon">
</button>
<p class="js-result result"></p>
<p class="js-moves">
</p>
<p class="js-score score"> </p>
<button onclick="
score.wins = 0;
score.losses = 0;
score.ties = 0;
// removing score object from local storage
localStorage.removeItem('score');
updateScoreElement();
" class="reset-score-button">
Reset Score
</button>
<script src="scripts/10-rock-paper-scissors.js">
</script>
</body>
</html>