-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
191 lines (189 loc) · 10.2 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
<!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>Mastermindle</title>
<link rel="stylesheet" href="style.css">
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HX44ZWZHD7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HX44ZWZHD7');
</script>
<body>
<div class="header-bar">
<h1>MASTERMINDLE</h1>
</div>
<button class="btn info" onclick="openInfo()">i</button>
<div class="modal win-modal" id="win-modal">CONGRATULATIONS YOU WON</div>
<div class="modal" id="info-modal">
<div class="info-content">
<span class="close" onclick="closeInfo()">X</span>
<h2>HOW TO PLAY</h2>
<p>Guess the colour combination in 10 tries.</p>
<p>Each combination will consist of any of the 8 given colour options, the combination CANNOT have duplicates.</p>
<p>Press check to check your answer. When this is done, the circles in the square below your guess will change colours based on the correctness of your answer.</p>
<p>If a circle is red, it means one of your choices is the correct colour and is in the correct position.</p>
<p>If a circle is white, it means that one of your choices is just the correct colour but is not in the correct position.</p>
<p>If a circle does not change colour, it means a colour is incorrect.</p>
<p>The order of the circles in the box do not necessarily correspond to the order of the colours in your guess.</p>
</div>
</div>
</body>
<div class="game-board">
<ul>
<li>
<div class="boxes" id="col1">
<div class="circle choice" id="c1" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c2" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c3" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c4" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col2">
<div class="circle choice" id="c5" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c6" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c7" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c8" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col3">
<div class="circle choice" id="c9" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c10" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c11" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c12" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col4">
<div class="circle choice" id="c13" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c14" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c15" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c16" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col5">
<div class="circle choice" id="c17" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c18" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c19" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c20" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col6">
<div class="circle choice" id="c21" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c22" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c23" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c24" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col7">
<div class="circle choice" id="c25" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c26" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c27" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c28" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col8">
<div class="circle choice" id="c29" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c30" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c31" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c32" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col9">
<div class="circle choice" id="c33" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c34" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c35" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c36" onclick="changeColor(this.id)"></div>
</div>
<div class="boxes" id="col10">
<div class="circle choice" id="c37" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c38" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c39" onclick="changeColor(this.id)"></div>
<div class="circle choice" id="c40" onclick="changeColor(this.id)"></div>
</div>
</li>
<li>
<div class="boxes result" id="box1">
<div class="circle one" id='box1c1'></div>
<div class="circle two" id='box1c2'></div>
<div class="circle three" id='box1c3'></div>
<div class="circle four" id='box1c4'></div>
</div>
<div class="boxes result" id="box2">
<div class="circle one" id='box2c1'></div>
<div class="circle two" id='box2c2'></div>
<div class="circle three" id='box2c3'></div>
<div class="circle four" id='box2c4'></div>
</div>
<div class="boxes result" id="box3">
<div class="circle one" id='box3c1'></div>
<div class="circle two" id='box3c2'></div>
<div class="circle three" id='box3c3'></div>
<div class="circle four" id='box3c4'></div>
</div>
<div class="boxes result" id="box4">
<div class="circle one" id='box4c1'></div>
<div class="circle two" id='box4c2'></div>
<div class="circle three" id='box4c3'></div>
<div class="circle four" id='box4c4'></div>
</div>
<div class="boxes result" id="box5">
<div class="circle one" id='box5c1'></div>
<div class="circle two" id='box5c2'></div>
<div class="circle three" id='box5c3'></div>
<div class="circle four" id='box5c4'></div>
</div>
<div class="boxes result" id="box6">
<div class="circle one" id='box6c1'></div>
<div class="circle two" id='box6c2'></div>
<div class="circle three" id='box6c3'></div>
<div class="circle four" id='box6c4'></div>
</div>
<div class="boxes result" id="box7">
<div class="circle one" id='box7c1'></div>
<div class="circle two" id='box7c2'></div>
<div class="circle three" id='box7c3'></div>
<div class="circle four" id='box7c4'></div>
</div>
<div class="boxes result" id="box8">
<div class="circle one" id='box8c1'></div>
<div class="circle two" id='box8c2'></div>
<div class="circle three" id='box8c3'></div>
<div class="circle four" id='box8c4'></div>
</div>
<div class="boxes result" id="box9">
<div class="circle one" id='box9c1'></div>
<div class="circle two" id='box9c2'></div>
<div class="circle three" id='box9c3'></div>
<div class="circle four" id='box9c4'></div>
</div>
<div class="boxes result" id="box10">
<div class="circle one" id='box10c1'></div>
<div class="circle two" id='box10c2'></div>
<div class="circle three" id='box10c3'></div>
<div class="circle four" id='box10c4'></div>
</div>
</li>
<div class="boxes solution">
<div class="circle answers" id="ansc1"></div>
<div class="circle answers" id="ansc2"></div>
<div class="circle answers" id="ansc3"></div>
<div class="circle answers" id="ansc4"></div>
</div>
</ul>
</div>
<div class="piece-box">
<ul>
<li>
<button class="pieces p1" id="p1" onclick="getColour(this.id)"></button>
<button class="pieces p2" id="p2" onclick="getColour(this.id)"></button>
<button class="pieces p3" id="p3" onclick="getColour(this.id)"></button>
<button class="pieces p4" id="p4" onclick="getColour(this.id)"></button>
<button class="pieces p5" id="p5" onclick="getColour(this.id)"></button>
<button class="pieces p6" id="p6" onclick="getColour(this.id)"></button>
<button class="pieces p7" id="p7" onclick="getColour(this.id)"></button>
<button class="pieces p8" id="p8" onclick="getColour(this.id)"></button>
<button class="btn check" onclick="checkAnswer()">CHECK</button>
</li>
</ul>
</div>
<div class="modal-backdrop" id="backdrop"></div>
<script src="main.js"></script>
</html>