-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
210 lines (189 loc) · 16 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rock | Paper | Scissors</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="start">
<div class="start-box">
<form action="POST">
<h1>Rock | Paper | Scissors</h1>
<p>Choose the score for winner!</p>
<input type="text" id="userName" placeholder="What is your name?" autocomplete="off">
<div class="radioBtn" id="radioBtn">
<input type="radio" value="3" name="round" id="round-3" checked>
<label for="round-3">3</label>
<input type="radio" value="5" name="round" id="round-5">
<label for="round-5">5</label>
<input type="radio" value="10" name="round" id="round-10">
<label for="round-10">10</label>
<input type="radio" value="15" name="round" id="round-15">
<label for="round-15">15</label>
</div>
<input type="submit" id="start" value="Start">
</form>
</div>
</div>
<div class="container">
<div class="top-bar">
<div class="candidate" id="user">
<svg><use xlink:href="#user-icon"></use></svg>
<div class="info">
<h4>User</h4>
<p id="user-score">0</p>
<div class="score-bar" id="score-bar">
<div class="score-progress" id="user-progress"></div>
</div>
</div>
</div>
<div id="vs">
<!-- <div><em>vs</em></div> -->
<div class="display-round">Topper</div>
<div class="count">
0
</div>
</div>
<div class="candidate" id="computer">
<svg><use xlink:href="#computer-icon"></use></svg>
<div class="info">
<h4>Computer</h4>
<p id="computer-score">0</p>
<div class="score-bar" id="score-bar">
<div class="score-progress" id="computer-progress"></div>
</div>
</div>
</div>
</div>
</div>
<div class="current-play">
<div class="icon" id="user-play">
<svg><use xlink:href="#rock-icon" ></use></svg>
</div>
<div class="current-result">Waiting...</div>
<div class="icon" id="computer-play">
<svg><use xlink:href="#paper-icon" ></use> </svg>
</div>
</div>
<div class="next-play" id="next-play">
<svg data-key="Scissors"><use xlink:href="#scissors-icon" ></use> </svg>
<svg data-key="Paper"><use xlink:href="#paper-icon" ></use> </svg>
<svg data-key="Rock"><use xlink:href="#rock-icon" ></use> </svg>
</div>
<div class="result">
<div class="result-box">
<h2>Result</h2>
<div class="score">
<div id="user-score-result">
<p><strong>User</strong></p>
<p class="scoreCount">0</p>
</div>
<div id="computer-score-result">
<p><strong>Computer</strong></p>
<p class="scoreCount">0</p>
</div>
</div>
<button id="replay">Replay</button>
</div>
</div>
</div>
<!-- <script src="script.js"></script> -->
<svg xmlns="http://www.w3.org/2000/svg" display="none">
<defs>
<style>
.cls-1{fill:#fff;}
.cls-1,.cls-2{
stroke:#000;
stroke-linecap:round;
stroke-linejoin:round;
stroke-width:5px;
}
.cls-2{fill:none;}
</style>
</defs>
<symbol id="scissors-icon" viewBox="0 0 200 200" transform="translate(140, 225) rotate(-110)">
<path id="imagebot_18" data-name="imagebot 18" class="cls-1" d="M14.38,63C5.69,64.4,3.21,57.79,2.55,50,1.63,38.91,13.17,17.21,21,11.37c7.24-5.34,14.8-5.93,19-.26"/><path id="imagebot_17" data-name="imagebot 17" class="cls-1" d="M97.3,6.34C79.82-2,44.91,3.37,30.15,20.57c-7.51,8.93-18,31.64-15.31,42.28C19.37,81,29.8,93.56,44.9,103.47a80.9,80.9,0,0,0,17.44,8.41C83,118.6,101,108,108.33,103.3c13.13,5.13,28.31,12.89,42.23,21,20.82,12.19,27.89-21,8.27-32.17-9.19-5.25-16.25-10.72-37-22C135,71.41,154.26,72.27,166.71,75c20.54,4.52,20.3-27.68-4.93-32.68-17.17-3.4-30.91-3.25-47.31-6.41-1.21-4.23,1-21-17.17-29.58Z"/><path id="imagebot_16" data-name="imagebot 16" d="M123.29,67.83c-15.84-2.45-24.52-.08-28.71.41,10,1.28,12.58,1.34,23.11,3.49a21.7,21.7,0,0,1,6.13,2.35Z"/><path id="imagebot_15" data-name="imagebot 15" d="M109.16,100.94c-8.76-3.42-20.13-5.44-28-4.85,9.56,3.51,17.12,6.27,26.31,9.41,0,0,.75-2.31,1.67-4.56Z"/><path id="imagebot_14" data-name="imagebot 14" class="cls-2" d="M27.62,55.35C36.79,64.47,40,65.71,45,69.39"/><path id="imagebot_13" data-name="imagebot 13" class="cls-2" d="M31.2,44.34C43.51,51.63,50.13,54,58.7,58.06"/><path id="imagebot_12" data-name="imagebot 12" class="cls-2" d="M35.86,31.32c9.07,3.84,13.72,4.82,19.63,6.64"/><path id="imagebot_11" data-name="imagebot 11" d="M116.64,33.77C95.71,30.38,90.56,21.5,82.46,13.68c7.63,10,7.78,19.33,31.66,24.72l2.52-4.63Z"/>
</symbol>
<symbol id="paper-icon" viewBox="0 0 200 200" transform="translate(0, 140) rotate(-50)">
<path id="path3894-6-1-0-5-5-2-9" class="cls-1" d="M44.89,151c-3,8.32-10,7.33-17.15,4.15-10.15-4.5-23.64-25.05-25-34.74-1.23-8.9,2-15.87,8.88-16.78"/><path id="path3112-2-8-6-8-2-9-8" class="cls-1" d="M11.27,30.79C.46,33.14,6.46,50.25,15.56,67c3.53,6.49-6.46,33-.3,49.86,4,11,19.05,31,29.66,33.79C63.08,155.34,79,152.25,95,143.76a80.49,80.49,0,0,0,15.75-11.25c14.23-13,61.36-29.23,64.37-33.36,8.36-11.48-7.89-18.76-16.83-15.77-4.33,1.44-37.34,8.31-32.94,4.62,10.81-9,24.9-18.63,38.73-26.93,20.69-12.41-5-34.53-24.25-22.71-9,5.54-17.2,9.1-37,21.94,7.39-11,17.41-27.48,25.79-37.09,13.82-15.84-14.53-31.1-31-11.37C86.3,25.27,68.71,51.69,44.58,69.35c.21-15.11-.72-45.63-33.31-38.56Z"/><path id="path3882-6-1-33-9-9-7-9" d="M101.43,57.83C91.68,70.55,89.58,79.31,88,83.18c5.9-8.14,7.18-10.36,14.13-18.57a22,22,0,0,1,5-4.24Z"/><path id="path3884-6-1-2-9-6-6-0" d="M123.69,86.12c-7.2,6-14.44,15-17.69,22.23,3.88-3.36,10.5-9.18,16.3-14.4a9.61,9.61,0,0,1,6.33-2.5c-2-1.42-3.4-3.44-4.94-5.33Z"/><path id="path3886-8-5-4-3-7-0-8" class="cls-2" d="M44.54,135.75c12.39-3.64,15-5.86,20.67-8.52"/><path id="path3888-4-4-9-8-4-7-4" class="cls-2" d="M36.6,127.32c12.28-7.28,17.5-11.93,25.25-17.53"/><path id="path3890-1-8-5-1-8-9-7" class="cls-2" d="M27.42,117c7.71-6.09,10.78-9.68,15.28-14"/>
</symbol>
<symbol id="rock-icon" viewBox="0 0 200 200" transform="translate(200, -30) rotate(100)">
<path id="path32292" class="cls-1" d="M119.25,77.29c8.15,3.34,12.06-2.54,14.48-10,3.42-10.56-2.89-34.32-9.2-41.78-5.84-6.85-13.06-9.15-18.44-4.58"/><path id="path32294" class="cls-1" d="M51.39,3.25c18.91-4.1,51.69,9,62.15,29.13,5.29,10.4,10.34,34.9,5.3,44.65-8.55,16.68-21.56,26.5-38.51,32.72A80.66,80.66,0,0,1,61.43,114c-24,2.58-43-2.1-42.83-18.81C-1.74,93.32-1.9,62.41,13,59.86-6.77,47.25,5.78,22.26,27.94,28.15,30.08,24.31,31.75,7.52,51.39,3.25Z"/><path id="path32296" d="M14.12,62.28c15.85,2.36,21.82-.57,26-1.08C30.11,60,27.54,59.94,17,57.85a14.17,14.17,0,0,1-5.83-2.46l.1,7.62a9.73,9.73,0,0,1,2.85-.73Z"/><path id="path32298" d="M17,97.43c9.4.37,21-.23,28.23-3.35C40.09,94,26.74,92.73,19,92.69c0,0,0,0-1.92,4.74Z"/><path id="path32300" class="cls-2" d="M108.1,66.82c-11,6.8-14.42,7.27-20.14,9.71"/><path id="path32302" class="cls-2" d="M107.12,55.28c-13.65,4.3-20.63,5.09-29.91,7.12"/><path id="path32304" class="cls-2" d="M105.54,41.55c-9.71,1.68-14.46,1.57-20.63,2"/><path id="path32306" d="M26.32,25.57c21.15,1.45,28.18-6,37.85-11.8-9.69,8-12,17.06-36.45,16.88l-1.4-5.08Z"/>
</symbol>
<symbol id="computer-icon" viewBox="0 0 110 110">
<ellipse style="fill:#010002;" cx="99.549" cy="28.919" rx="1.51" ry="0.752"/>
<path style="fill:#010002;" d="M106.585,17.166H67.443c-1.657,0-3.013,1.356-3.013,3.01V31.07h6.027v-8.353h33.119v9.029H75.163
v8.278h28.412v1.507H75.163v7.526h28.412v1.503H75.163v34.189H64.437v4.67c0,1.653,1.356,3.01,3.01,3.01h39.145
c1.653,0,3.01-1.356,3.01-3.01V20.172C109.595,18.522,108.239,17.166,106.585,17.166z M87.009,72.527
c-2.491,0-4.517-2.018-4.517-4.517c0-2.491,2.022-4.517,4.517-4.517c2.494,0,4.52,2.018,4.52,4.517
C91.529,70.509,89.503,72.527,87.009,72.527z"/>
<rect x="0" y="34.652" style="fill:#010002;" width="71.577" height="46.525"/>
<polygon style="fill:#010002;" points="25.052,85.279 17.894,92.436 53.683,92.436 46.525,85.279 "/>
</symbol>
<symbol id="user-icon" viewBox="0 0 800 800">
<circle cx="393.111" cy="201.502" r="155.781"/>
<polygon points="431.486,418.581 393.11,380.205 354.734,418.581 "/>
<path d="M756.096,705.838c0.486-0.283,0.977-0.562,1.455-0.854c0.342-0.209,0.676-0.434,1.014-0.65
c0.504-0.32,1.006-0.645,1.498-0.979c0.309-0.215,0.617-0.436,0.922-0.654c0.512-0.363,1.018-0.73,1.516-1.109
c0.293-0.223,0.58-0.451,0.875-0.684c0.494-0.391,0.982-0.785,1.471-1.191c0.113-0.098,0.234-0.188,0.352-0.285
c0.188-0.16,0.363-0.33,0.549-0.494c0.438-0.381,0.871-0.77,1.297-1.164c0.344-0.318,0.682-0.641,1.016-0.965
c0.348-0.338,0.691-0.684,1.031-1.029c0.389-0.395,0.768-0.789,1.141-1.193c0.266-0.285,0.527-0.572,0.785-0.861
c0.42-0.469,0.832-0.939,1.23-1.42c0.201-0.238,0.398-0.48,0.598-0.725c0.432-0.527,0.854-1.062,1.264-1.607
c0.162-0.211,0.316-0.428,0.479-0.645c0.422-0.568,0.834-1.146,1.232-1.729c0.148-0.217,0.293-0.439,0.438-0.66
c0.387-0.58,0.766-1.164,1.131-1.756c0.158-0.26,0.311-0.525,0.471-0.787c0.33-0.553,0.65-1.109,0.961-1.672
c0.189-0.342,0.369-0.691,0.553-1.037c0.252-0.486,0.512-0.973,0.752-1.467c0.221-0.449,0.434-0.908,0.641-1.365
c0.186-0.395,0.373-0.795,0.545-1.195c0.244-0.559,0.473-1.131,0.699-1.697c0.123-0.307,0.246-0.613,0.363-0.92
c0.248-0.652,0.48-1.314,0.705-1.98c0.08-0.234,0.164-0.469,0.24-0.705c0.232-0.713,0.447-1.436,0.654-2.16
c0.059-0.199,0.113-0.395,0.17-0.596c0.199-0.732,0.383-1.473,0.557-2.215c0.047-0.209,0.096-0.414,0.143-0.619
c0.158-0.717,0.301-1.436,0.434-2.16c0.045-0.254,0.096-0.508,0.137-0.762c0.115-0.666,0.213-1.336,0.307-2.01
c0.045-0.332,0.086-0.662,0.125-0.994c0.07-0.6,0.133-1.197,0.188-1.797c0.035-0.43,0.066-0.857,0.098-1.285
c0.035-0.521,0.064-1.039,0.086-1.562c0.008-0.117,0.008-0.234,0.012-0.35v-4.289c-0.018-0.43-0.029-0.859-0.055-1.285
c-0.031-0.555-0.078-1.105-0.125-1.662c-0.037-0.441-0.07-0.889-0.117-1.332c-0.055-0.514-0.125-1.027-0.193-1.539
c-0.062-0.475-0.121-0.953-0.197-1.428c-0.07-0.463-0.16-0.928-0.248-1.391c-0.092-0.512-0.18-1.023-0.287-1.527
c-0.086-0.424-0.189-0.846-0.289-1.266c-0.127-0.539-0.242-1.078-0.383-1.607c-0.104-0.4-0.227-0.799-0.342-1.201
c-0.152-0.541-0.299-1.082-0.469-1.615c-0.129-0.408-0.271-0.812-0.408-1.219c-0.178-0.518-0.346-1.041-0.535-1.553
c-0.156-0.424-0.33-0.844-0.498-1.266c-0.189-0.482-0.377-0.975-0.58-1.453c-0.186-0.436-0.387-0.861-0.582-1.293
c-0.211-0.461-0.414-0.924-0.633-1.377c-0.207-0.43-0.434-0.848-0.646-1.271c-0.232-0.451-0.459-0.906-0.705-1.348
c-0.219-0.4-0.457-0.799-0.688-1.199c-0.264-0.457-0.525-0.916-0.799-1.371c-0.227-0.365-0.467-0.725-0.703-1.088
c-0.303-0.477-0.607-0.953-0.928-1.418c-0.229-0.338-0.471-0.668-0.709-1.002c-0.342-0.48-0.688-0.963-1.047-1.434
c-0.242-0.318-0.494-0.635-0.746-0.951c-0.369-0.465-0.742-0.93-1.125-1.385c-0.104-0.125-0.201-0.256-0.307-0.383L579.988,389.97
c-11.676-13.675-28.16-20.803-44.83-21.051v-0.022h-5.316v53.142h45.984c18.549,0,33.645,15.093,33.645,33.645v227.965
c0,8.531-3.209,16.316-8.465,22.252h-22.76c9.566-3.057,16.498-12.018,16.498-22.598V461.336
c0-13.102-10.623-23.723-23.727-23.723H215.197c-13.101,0-23.722,10.621-23.722,23.723v221.967
c0,10.58,6.928,19.539,16.496,22.598h-22.759c-5.255-5.938-8.464-13.723-8.464-22.254V455.688
c0-18.555,15.092-33.646,33.645-33.646h45.983v-53.142c0,0-7.885,0.152-10.508,0.325c-14.899,0.983-29.178,8.497-39.639,20.749
L14.345,614.697c-0.107,0.125-0.205,0.256-0.31,0.381c-0.382,0.457-0.753,0.92-1.123,1.387c-0.25,0.318-0.504,0.633-0.748,0.951
c-0.358,0.471-0.704,0.951-1.047,1.436c-0.237,0.332-0.479,0.662-0.708,1c-0.319,0.467-0.625,0.941-0.93,1.418
c-0.234,0.361-0.473,0.723-0.699,1.09c-0.276,0.451-0.538,0.912-0.801,1.369c-0.232,0.4-0.467,0.799-0.687,1.199
c-0.244,0.441-0.469,0.896-0.7,1.348c-0.219,0.424-0.443,0.844-0.651,1.271c-0.221,0.453-0.423,0.914-0.632,1.377
c-0.196,0.43-0.399,0.859-0.584,1.293c-0.204,0.48-0.388,0.971-0.58,1.453c-0.167,0.426-0.342,0.842-0.498,1.266
c-0.189,0.514-0.36,1.035-0.533,1.555c-0.138,0.406-0.283,0.809-0.41,1.215c-0.168,0.535-0.317,1.076-0.47,1.619
c-0.114,0.398-0.234,0.799-0.34,1.199c-0.137,0.529-0.256,1.07-0.382,1.609c-0.098,0.42-0.202,0.84-0.292,1.266
c-0.106,0.506-0.19,1.016-0.284,1.525c-0.085,0.465-0.175,0.928-0.249,1.391c-0.074,0.477-0.133,0.951-0.194,1.43
c-0.07,0.514-0.142,1.025-0.196,1.537c-0.047,0.441-0.08,0.889-0.118,1.334c-0.045,0.555-0.092,1.105-0.125,1.66
c-0.024,0.432-0.037,0.863-0.053,1.299C0,651.582,0,651.59,0,651.596v4.191c0.004,0.139,0.005,0.275,0.011,0.41
c0.021,0.523,0.051,1.041,0.085,1.562c0.028,0.43,0.061,0.854,0.099,1.287c0.054,0.6,0.115,1.197,0.186,1.793
c0.04,0.336,0.082,0.666,0.127,0.998c0.091,0.674,0.193,1.346,0.305,2.01c0.044,0.254,0.09,0.508,0.138,0.762
c0.131,0.723,0.273,1.443,0.433,2.16c0.045,0.205,0.095,0.41,0.143,0.619c0.172,0.742,0.354,1.48,0.556,2.213
c0.055,0.203,0.113,0.396,0.169,0.598c0.207,0.725,0.422,1.443,0.652,2.16c0.077,0.232,0.161,0.469,0.241,0.705
c0.227,0.666,0.457,1.326,0.705,1.979c0.115,0.309,0.241,0.615,0.363,0.92c0.228,0.568,0.457,1.141,0.699,1.697
c0.175,0.402,0.361,0.801,0.542,1.197c0.211,0.457,0.42,0.914,0.642,1.365c0.241,0.492,0.497,0.98,0.752,1.467
c0.184,0.346,0.363,0.695,0.553,1.037c0.308,0.562,0.632,1.119,0.96,1.67c0.157,0.262,0.311,0.527,0.472,0.789
c0.362,0.59,0.742,1.174,1.129,1.756c0.146,0.221,0.289,0.441,0.438,0.658c0.398,0.584,0.812,1.16,1.231,1.73
c0.161,0.213,0.317,0.432,0.479,0.645c0.41,0.545,0.833,1.076,1.265,1.607c0.197,0.244,0.393,0.484,0.594,0.725
c0.402,0.479,0.813,0.951,1.231,1.418c0.258,0.291,0.52,0.576,0.785,0.863c0.373,0.402,0.751,0.799,1.14,1.191
c0.341,0.35,0.686,0.693,1.033,1.031c0.335,0.324,0.671,0.645,1.015,0.965c0.427,0.396,0.859,0.781,1.296,1.164
c0.188,0.162,0.362,0.332,0.55,0.49c0.116,0.102,0.236,0.191,0.353,0.289c0.482,0.406,0.974,0.801,1.471,1.191
c0.288,0.229,0.577,0.461,0.869,0.684c0.499,0.379,1.006,0.746,1.518,1.107c0.307,0.219,0.612,0.441,0.922,0.656
c0.492,0.336,0.995,0.658,1.498,0.98c0.337,0.217,0.672,0.438,1.015,0.646c0.478,0.295,0.967,0.572,1.455,0.855
c0.037,0.018,0.073,0.039,0.108,0.061H0.001v34.604h786.22V705.9h-30.232v-0.004C756.023,705.877,756.059,705.857,756.096,705.838
z"/>
</symbol>
</svg>
<script src="main.js"></script>
</body>
</html>