-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRPSGame.html
86 lines (73 loc) · 2.18 KB
/
RPSGame.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
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="RPSGame.css">
<title>RPSGame</title>
<link rel="shortcut icon" href="./Resources/favicon.png" type="image/x-icon">
</head>
<body>
<h1>Rock Paper Scissors</h1>
<div class="icons">
<button onclick="
usermove='Rock';
generateComputerMove();
evaluateMoves();
console.log(gameHistory);
renderGameSummary();
renderGameHistory()">
<img src="./Resources/rock.png" alt="rock icon" id="Icon"></button>
<!-- <p> Rock </p> -->
<button onclick="usermove='Paper';
generateComputerMove();
evaluateMoves();
renderGameSummary();">
<img src="./Resources/paper.png" alt="paper icon" id="Icon"></button>
<!-- <p> Paper </p> -->
<button onclick="usermove='Scissors';
generateComputerMove();
evaluateMoves();
renderGameSummary();">
<img src="./Resources/scissors.png" alt="scissors icon" id="Icon"></button>
<!-- <p>Scissors</p> -->
<button onclick="resetGame()"><img src="./Resources/reset.jpg" alt="Reset" srcset="" id="resetIcon"></button>
</div>
<br><br><br><br>
<div class="gsum">
<h1>Game Summary</h1>
<br>
<table>
<tr>
<th>Win</th>
<th>Loss</th>
<th>Draw</th>
<th>Games Played</th>
</tr>
<tr>
<td id="wins">0</td>
<td id="loses">0</td>
<td id="ties">0</td>
<td id="gp">0</td>
</tr>
</table>
</div>
<br><br><br><br>
<h1>Game History</h1>
<table id="his">
<tr>
<th>#</th>
<th>User Move</th>
<th>Computer Move</th>
<th>Result</th>
</tr>
<tr>
<td>1.</td>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
</table>
<script src="RPSGame.js"></script>
</body>
</html>