-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
182 lines (173 loc) · 7.53 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
<!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, user-scalable=no, maximum-scale=1">
<title>Fast Flood - A Logic Puzzle</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<!-- Fathom - beautiful, simple website analytics -->
<script src="https://squid.dylancastillo.co/script.js" data-site="FRHOZKEO" defer></script>
<!-- / Fathom -->
<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<meta name="keywords" content="Flood Game, Flood It, Logic Puzzle, Fast Flood">
<meta name="description"
content="Fast Flood is a simple but addictive logic game. It's simple: make all the squares in the grid the same color in 16 moves or less.">
<meta property="og:title" content="Fast Flood - A Logic Puzzle" />
<meta property="og:description"
content="Fast Flood is a simple but addictive logic game. It's simple: make all the squares in the grid the same color in 16 moves or less." />
<meta property="og:url" content="https//fastflood.dylancastillo.co" />
<meta property="og:image" content="https://dylanjcastillo.github.io/fast-flood/images/meta-image.jpg" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Fast Flood - A Logic Puzzle" />
<meta property="twitter:description"
content="Fast Flood is a simple but addictive logic game. It's simple: make all the squares in the grid the same color in 16 moves or less." />
<meta name="twitter:site" content="@_dylancastillo" />
<meta name="twitter:image" content="https://dylanjcastillo.github.io/fast-flood/images/meta-image.jpg" />
<meta name="twitter:creator" content="@_dylancastillo" />
</head>
<body>
<script type="module" src="src/main.js">
</script>
<a class="btn" href="#open-modal" id="open-modal-btn" hidden></a>
</div>
<div id="open-modal" class="modal-window">
<div>
<h1>Welcome to Fast Flood</h1>
<p>These are the rules of the game:</p>
<ol>
<li>
Your goal is to make all the squares the same color in 16 moves or less.
</li>
<li>
You start on the top-left corner and change the color of the adjacent squares
by
clicking the buttons below the grid.
</li>
<li>
You can try 3 times per day to solve the puzzle. There's a new puzzle every day.
</li>
</ol>
<div class="button">
<button id="start-btn" href="#" onclick="fathom.trackGoal('TBZOKGJM', 0);">Play now</button>
</div>
<div id="cb-container">
<label><input type="checkbox" id="cb" value="">I'm colorblind</label>
</div>
<div id="feedback-container">
<a href="https://forms.gle/sNhhpaAkTQwhDVT98" id="feedback">😡 Feedback</a>
<a href="https://twitter.com/_dylancastillo" id="feedback">📫 Get in touch</a>
</div>
</div>
</div>
</div>
<div id="title">
<h1>Fast Flood</h1>
</div>
<div id="countdown-background"></div>
<div id="countdown">
<div id="countdown-value">3</div>
</div>
<div id="game-finished-modal" class="">
<div>
<div id="message-finished">
<p id="message-part-1"></p>
<p id="message-part-2"></p>
</div>
</div>
<div id="results-summary">
<div id="tabs">
<button onclick="open_tab(event, 'results-1')" class="tab-button" id="button-1">1</button>
<button onclick="open_tab(event, 'results-2')" class="tab-button" id="button-2">2</button>
<button onclick="open_tab(event, 'results-3')" class="tab-button" id="button-3">3</button>
</div>
<div id="scores-container">
<div id="results-1" class="score-summary tab" style="display:none;">
<p>
⌛ → <span id="final-time-1"></span>
</p>
<p>
▶️ → <span id="final-moves-1"></span>
</p>
<p>
🕹 → <span id="final-tries-1"></span>
</p>
</div>
<div id="results-2" class="score-summary tab" style="display:none;">
<p>
⌛ → <span id="final-time-2"></span>
</p>
<p>
▶️ → <span id="final-moves-2"></span>
</p>
<p>
🕹 → <span id="final-tries-2"></span>
</p>
</div>
<div id="results-3" class="score-summary tab" style="display:none;">
<p>
⌛ → <span id="final-time-3"></span>
</p>
<p>
▶️ → <span id="final-moves-3"></span>
</p>
<p>
🕹 → <span id="final-tries-3"></span>
</p>
</div>
</div>
</div>
<div id="game-finished-buttons">
<div class="button tooltip">
<button id="share-btn" href="#" data-clipboard-text="" onclick="fathom.trackGoal('IIDUYDM2', 0)">
<i class="bi-files"></i> Copy score</button>
</div>
<div class="button">
<button id="restart-btn" href="#" onclick="fathom.trackGoal('CI8GWU1L', 0);">Play again</button>
</div>
<div class="button">
<button id="solution-btn" href="#" onclick="fathom.trackGoal('RXDJFZXM', 0);" hidden>See
solution</button>
</div>
</div>
<div id="copied-feedback">
<p>Copied score to clipboard!</p>
</div>
</div>
</div>
<div id="game">
<div id="score">
<div id="time">
<span id="time-text">⏳</span>
<span id="time-value"></span>
</div>
<div id="moves">
<span id="moves-text">▶️</span>
<span id="moves-value"></span>
</div>
</div>
<div id="grid"></div>
</div>
<div id="buttons"></div>
<div id="footer"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/cash/8.1.1/cash.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.5/seedrandom.min.js"></script>
<script>
function open_tab(evt, cityName) {
var i, x, tablinks;
x = document.getElementsByClassName("tab");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tab-button");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" selected", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " selected";
}
</script>
</body>
</html>