-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
38 lines (38 loc) · 1.24 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>rock paper scissors</title>
<link rel="stylesheet" href="rock-paper-scissors.css">
</head>
<body>
<p id="title">Rock Paper scissors</p>
<button class="butt_icon" onclick="
game('rock');
">
<img class="icon" src="images/rock-emoji.png"></button>
<button class="butt_icon" onclick="
game('paper');
">
<img class="icon" src="images/paper-emoji.png"></button>
<button class="butt_icon" onclick="
game('scissors');
">
<img class="icon" src="images/scissors-emoji.png"></button>
<p id="result"></p>
<p style="white-space: pre;" id="moves"></p>
<p id="score"></p>
<button id="reset" onclick="
score.wins=0;
score.losses=0; //set the live score to zero
score.ties=0;
localStorage.removeItem('score');
// and destroy the local storage in case of direct refresh
score_update();
document.querySelectorAll('.result, .moves').forEach(element => {element.innerHTML='';});
">Reset Score</button>
<button class="autoPlay" onclick="autoplay();">auto play</button>
<script src="rock-paper-scissors.js"> </script>
</body>
</html>