-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
226 lines (221 loc) · 10 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!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">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<title>Mastermind</title>
<link rel="shortcut icon" href="assets/favicon.ico">
<meta name="author" content="Olivier Luethy">
<!-- To import the font-family from google fonts -->
<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=Tapestry&display=swap" rel="stylesheet">
</head>
<body>
<div class="main">
<!-- Mastermind Field -->
<div class="mastermindField">
<h1>Mastermind <i title="See detailed informations about this game" class="fa fa-info-circle" id="information"></i></h1>
<div class="mastermind-area">
<div class="mastermind-color-code-result">
<div class="color-result"><img id="questionmark1" src="assets/qeuestion_mark.png" alt=""></div>
<div class="color-result"><img id="questionmark2" src="assets/qeuestion_mark.png" alt=""></div>
<div class="color-result"><img id="questionmark3" src="assets/qeuestion_mark.png" alt=""></div>
<div class="color-result"><img id="questionmark4" src="assets/qeuestion_mark.png" alt=""></div>
</div>
<hr class="solid">
<div class="mastermind-guesses">
<br>
<!-- Attempt nine -->
<div class="attempt10"></div>
<div class="attempt10"></div>
<div class="attempt10"></div>
<div class="attempt10"></div>
<br>
<br>
<!-- Attempt nine -->
<div class="attempt9"></div>
<div class="attempt9"></div>
<div class="attempt9"></div>
<div class="attempt9"></div>
<br>
<br>
<!-- Attempt eight -->
<div class="attempt8"></div>
<div class="attempt8"></div>
<div class="attempt8"></div>
<div class="attempt8"></div>
<br>
<br>
<!-- Attempt seven -->
<div class="attempt7"></div>
<div class="attempt7"></div>
<div class="attempt7"></div>
<div class="attempt7"></div>
<br>
<br>
<!-- Attempt six -->
<div class="attempt6"></div>
<div class="attempt6"></div>
<div class="attempt6"></div>
<div class="attempt6"></div>
<br>
<br>
<!-- Attempt five -->
<div class="attempt5"></div>
<div class="attempt5"></div>
<div class="attempt5"></div>
<div class="attempt5"></div>
<br>
<br>
<!-- Attempt four -->
<div class="attempt4"></div>
<div class="attempt4"></div>
<div class="attempt4"></div>
<div class="attempt4"></div>
<br>
<br>
<!-- Attempt three -->
<div class="attempt3"></div>
<div class="attempt3"></div>
<div class="attempt3"></div>
<div class="attempt3"></div>
<br>
<br>
<!-- Attempt two -->
<div class="attempt2"></div>
<div class="attempt2"></div>
<div class="attempt2"></div>
<div class="attempt2"></div>
<br>
<br>
<!-- Attempt one -->
<div class="attempt1"></div>
<div class="attempt1"></div>
<div class="attempt1"></div>
<div class="attempt1"></div>
<br>
</div>
</div>
<!-- Color options for the user -->
<div id="circle-options">
<button title="pink" class="circles" style="background-color: pink"></button>
<button title="red" class="circles" style="background-color: red;"></button>
<button title="violet" class="circles" style="background-color: violet;"></button>
<button title="blue" class="circles" style="background-color: blue;"></button>
<button title="yellow" class="circles" style="background-color: yellow;"></button>
<button title="black" class="circles" style="background-color: black;"></button>
<div id="delete"><i class="fa fa-angle-left"></i> Delete</div>
</div>
</div>
<!-- For displaying how many colors were correct or not -->
<div class="rating">
<div class="rate">
<div class="rate-circle10"></div>
<div class="rate-circle10"></div>
<div class="rate-circle10"></div>
<div class="rate-circle10"></div>
</div>
<div class="rate">
<div class="rate-circle9"></div>
<div class="rate-circle9"></div>
<div class="rate-circle9"></div>
<div class="rate-circle9"></div>
</div>
<div class="rate">
<div class="rate-circle8"></div>
<div class="rate-circle8"></div>
<div class="rate-circle8"></div>
<div class="rate-circle8"></div>
</div>
<div class="rate">
<div class="rate-circle7"></div>
<div class="rate-circle7"></div>
<div class="rate-circle7"></div>
<div class="rate-circle7"></div>
</div>
<div class="rate">
<div class="rate-circle6"></div>
<div class="rate-circle6"></div>
<div class="rate-circle6"></div>
<div class="rate-circle6"></div>
</div>
<div class="rate">
<div class="rate-circle5"></div>
<div class="rate-circle5"></div>
<div class="rate-circle5"></div>
<div class="rate-circle5"></div>
</div>
<div class="rate">
<div class="rate-circle4"></div>
<div class="rate-circle4"></div>
<div class="rate-circle4"></div>
<div class="rate-circle4"></div>
</div>
<div class="rate">
<div class="rate-circle3"></div>
<div class="rate-circle3"></div>
<div class="rate-circle3"></div>
<div class="rate-circle3"></div>
</div>
<div class="rate">
<div class="rate-circle2"></div>
<div class="rate-circle2"></div>
<div class="rate-circle2"></div>
<div class="rate-circle2"></div>
</div>
<div class="rate">
<div class="rate-circle1"></div>
<div class="rate-circle1"></div>
<div class="rate-circle1"></div>
<div class="rate-circle1"></div>
</div>
</div>
<!-- Model that appears when you have lost -->
<div id="youHaveLost" class="have_lost">
<div class="modal-content">
<div class="modal-header">
<span id="have_lost_close">×</span>
<h1>You have lost!</h1>
<button onclick="replay()" class="replay">Replay</button>
</div>
</div>
</div>
<!-- Model that appears when you have won -->
<div id="youHaveWon" class="have_won">
<div class="modal-content">
<div class="modal-header">
<span id="have_won_close">×</span>
<h1>You have won!</h1>
<button onclick="replay()" class="replay">Replay</button>
</div>
</div>
</div>
<!-- Model that shows informations for the user after he clicks on the info button -->
<div id="informationModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>Informations</h2>
<h3>What is the goal of this game?</h3>
<li>You have to find out the right color code.</li>
<br>
<h3>For what are the circles on the right?</h3>
<li>In this circles will be shown how many selected colors are in the code and in the right position, how many colors are in the code but not in the right position and how many colors aren't in the code.</li>
<li>But the colors will be only displayed, when you have selected 4 colors for an attempt!</li>
<br>
<h3>What do the colors in the right circles exactly define?</h3>
<li>Black circles: A color is in the code and in the right position.</li>
<li>Gray circles: A color is in the code but not in the right position.</li>
<li>White circles: A color is not in the code</li>
<br>
</div>
</div>
</div>
</div>
<script src="js/main.js"></script>
</body>
</html>