-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
116 lines (104 loc) · 4.41 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="index.css">
<title>Odin: Rock | Paper | Scissors</title>
</head>
<body>
<div id="main">
<h1>Rock Paper Scissors Game</h1>
<p>
Rock, paper, scissors (also known as Rochambeau, Roshambo, or Janken) is a fun and easy hand game that anyone can learn and enjoy.
</p>
<div id="rules">
<div role="button" id="toggle-rules">
<span>Instructions</span>
<i class="arrow up"></i>
</div>
<div id="rules-content">
<section>
<h2>📜 Constraints</h2>
<ol>
<li>Only <span class="code">rock</span>, <span class="code">paper</span>, & <span
class="code">scissors</span>
are allowed game inputs.</li>
<li>Cheating attempt is an automatic <span class="code">failure</span>.</li>
<li>You win the game if you reach the score of <span class="code">5</span> before your opponent.</li>
<li>Play input is case-insensitive, meaning, <span class="code">rock</span> == <span
class="code">ROCK</span>
== <span class="code">Rock</span>.</li>
</ol>
</section>
<section>
<h2>🎬 Scenarios</h2>
<ol>
<li>
<b>TIE: </b>
A play round is <span class="code">Tied</span> when both players draw the same inputs. For example, <span
class="code">rock</span>+<span class="code">rock</span>, <span class="code">scissors</span>+<span
class="code">scissors</span>, or <span class="code">paper</span>+<span class="code">paper</span>.
</li>
<li>
<b>WIN: </b>
A play round is <span class="code">Won</span> when it draws <span class="code">rock</span>+<span
class="code">scissors</span>, <span class="code">paper</span>+<span class="code">rock</span>, or <span
class="code">scissors</span>+<span class="code">paper</span>,
respectively to <span class="code">player</span>+<span class="code">computer</span>.
</li>
<li>
<b>LOST: </b>
A play round is <span class="code">Lost</span> when both scenarios <span class="code">1</span> & <span
class="code">2</span> fail.
</li>
</ol>
</section>
<section>
<h2>🙋 Let's Play</h2>
<ol>
<li>
From the three <span class="code">Play buttons</span> (<span class="code">rock</span><><span class="code">fist</span>, <span class="code">paper</span><><span class="code">hand</span>, <span class="code">scissor</span><><span class="code">Two fingers</span>), select one which best suits your choice. You should be able to see the result of the play round and the current game score, just above the <span class="code">Play buttons</span> belt.
</li>
<li>
Repeat step <span class="code">1</span> until the game is concluded.
</li>
<li>Press the <span class="code">Restart</span> button anytime you wish to reset the game.</li>
</ol>
</section>
<section>
<h2>💡 Tips</h2>
<p>Have fun!</p>
</section>
</div>
</div>
<section id="game-board">
<h2>Let's Play</h2>
<div id="game-score">
<div class="game-user-score player-score">
<span>Player</span>
<span>0</span>
</div>
<div class="game-user-score opponent-score">
<span>0</span>
<span>Opponent</span>
</div>
</div>
<div id="game-results"></div>
<div id="game-tools">
<button id="rock" class="game-selection">👊</button>
<button id="paper" class="game-selection">🫱</button>
<button id="scissors" class="game-selection">✌️</button>
</div>
<div id="game-controls">
<button id="game-reset">Restart</button>
</div>
</section>
</div>
<script src="rps-core.js"></script>
<script src="index.js"></script>
</body>
</html>