-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
286 lines (263 loc) · 13.2 KB
/
index.html
File metadata and controls
286 lines (263 loc) · 13.2 KB
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<html manifest="cache.appcache">
<head>
<meta charset="UTF-8">
<meta name="author" content="import-this">
<meta name="application-name" content="notbot">
<meta name="description" content="A fast-paced interactive puzzle game - #notbot">
<meta name="keywords" content="notbot, game, puzzle,
2D, HTML, HTML5, CSS3, jQuery,
import-this, github, github.io, open source">
<meta name="robots" content="index, follow">
<!-- Mobile devices magic. -->
<meta name="viewport" content="width=device-width, height=device-height, minimal-ui">
<!-- Open Graph for Facebook. -->
<meta property="og:url" content="https://import-this.github.io/notbot/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="notbot" />
<meta property="og:site_name" content="notbot" />
<meta property="og:image" content="https://import-this.github.io/notbot/img/wallpaper.png" />
<meta property="og:description" content="A fast-paced interactive puzzle game - #notbot" />
<!-- Google Search Console verification method. -->
<meta name="google-site-verification" content="l3FLvijRzmzAxnDb7k-KtuYtiKbbELUQLsvJUs1YOs0" />
<title>!bot</title>
<link rel="stylesheet" type="text/css" href="css/notbot.css">
<!-- jQuery from jQuery CDN with Subresource Integrity (SRI) checking. -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script type="text/javascript" src="js/notbot.js"></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-87031518-2', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<!-- Facebook JavaScript SDK -->
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div id="container">
<header id="header">
<h2 id="notbot"><span id="exclamation">!</span>bot</h2>
<div id="description">
<p id="instructions">
<strong>
Click on the bots to rotate them and help them reach their post simultaneously.
</strong>
</p>
</div>
<div id="options">
<div id="checkboxes">
<input id="bump-walls" type="checkbox" name="bump" value="1">
<label for="bump-walls"><span></span>Bump off walls</label>
<input id="bump-bots" type="checkbox" name="bump" value="2">
<label for="bump-bots"><span></span>Bump off bots</label>
</div>
<div id="radios">
<input id="two" type="radio" name="bot-count" value="2">
<label for="two"><span></span>2 bots</label>
<input id="three" type="radio" name="bot-count" value="3">
<label for="three"><span></span>3 bots</label>
<input id="four" type="radio" name="bot-count" value="4">
<label for="four"><span></span>4 bots</label>
<input id="five" type="radio" name="bot-count" value="5">
<label for="five"><span></span>5 bots</label>
</div>
<!-- <input id="static" type="checkbox" value="static">
<label for="static"><span></span>Static</label> -->
</div>
<div>
<button id="new-game" class="restart-button" name="restart" type="button">New Game</button>
<div id="stats">
<div>
<div id="move-count" class="button">Moves: <span>0</span></div>
<div id="best-move-count" class="button">Best: <span>N/A</span></div>
</div>
<div>
<div id="time" class="button">Time: <span>00:00</span></div>
<div id="best-time" class="button">Best: <span>N/A</span></div>
</div>
</div>
</div>
</header>
<div id="game-container">
<div id="win-screen">
<div>
<div id="win">You win!</div>
<button class="restart-button" name="restart" type="button">Try again</button>
<div>
<!-- Facebook Like and Share Buttons -->
<div class="fb-like" data-href="https://www.facebook.com/notbot-137519560060123/" data-layout="button" data-action="like" data-size="large" data-show-faces="false" data-share="true"></div>
</div>
</div>
</div>
<div id="grid-container">
<table id="grid">
<tr class="row">
<td id="p-0-0" class="cell"></td>
<td id="p-0-1" class="cell"></td>
<td id="p-0-2" class="cell"></td>
<td id="p-0-3" class="cell"></td>
<td id="p-0-4" class="cell"></td>
</tr>
<tr class="row">
<td id="p-1-0" class="cell"></td>
<td id="p-1-1" class="cell"></td>
<td id="p-1-2" class="cell"></td>
<td id="p-1-3" class="cell"></td>
<td id="p-1-4" class="cell"></td>
</tr>
<tr class="row">
<td id="p-2-0" class="cell"></td>
<td id="p-2-1" class="cell"></td>
<td id="p-2-2" class="cell"></td>
<td id="p-2-3" class="cell"></td>
<td id="p-2-4" class="cell"></td>
</tr>
<tr class="row">
<td id="p-3-0" class="cell"></td>
<td id="p-3-1" class="cell"></td>
<td id="p-3-2" class="cell"></td>
<td id="p-3-3" class="cell"></td>
<td id="p-3-4" class="cell"></td>
</tr>
<tr class="row">
<td id="p-4-0" class="cell"></td>
<td id="p-4-1" class="cell"></td>
<td id="p-4-2" class="cell"></td>
<td id="p-4-3" class="cell"></td>
<td id="p-4-4" class="cell"></td>
</tr>
</table>
</div>
<div id="bot-container">
<div id="bot0" class="bot">
<span class="number">1</span><span class="arrow">▶</span>
</div>
<div id="bot1" class="bot">
<span class="number">2</span><span class="arrow">▶</span>
</div>
<div id="bot2" class="bot three">
<span class="number">3</span><span class="arrow">▶</span>
</div>
<div id="bot3" class="bot four">
<span class="number">4</span><span class="arrow">▶</span>
</div>
<div id="bot4" class="bot five">
<span class="number">5</span><span class="arrow">▶</span>
</div>
</div>
<div id="post-container">
<div id="post0" class="post"><span class="number">1</span></div>
<div id="post1" class="post"><span class="number">2</span></div>
<div id="post2" class="post three"><span class="number">3</span></div>
<div id="post3" class="post four"><span class="number">4</span></div>
<div id="post4" class="post five"><span class="number">5</span></div>
</div>
</div>
<div id="info">
<p>
It is read as <em>notbot</em>.
</p>
</div>
<hr>
<div id="footer">
<div id="more">
<p>
Created by <a href="https://import-this.github.io/" title="GitHub profile">import-this</a>.
</p>
</div>
<div id="social">
<!-- Facebook Like and Share Buttons -->
<div class="fb-like" data-href="https://www.facebook.com//" data-layout="button" data-action="like" data-size="large" data-show-faces="false" data-share="true"></div>
<!-- GitHub Star Button (https://ghbtns.com/ with modifications) -->
<iframe src="https://ghbtns.com/github-btn.html?user=import-this&repo=notbot&type=star" scrolling="0" width="50" height="20"></iframe>
</div>
<hr>
<div id="about">
<a href="about.html" title="About the game">About</a> -
<a href="terms.html" title="About usage rules">Terms of Use</a> -
<a href="privacy.html" title="About collected info">Privacy Policy</a>
</div>
</div>
</div>
<script type="text/javascript">
/*globals jQuery, notbot */
(function($, notbot) {
"use strict";
function start() {
function square() {
var $cells = $('.cell'), $elements = $('.bot, .post');
$cells.height($cells.width());
// Bots and posts are not table elements,
// so they need both their width and height fixed.
$elements.width($cells.width());
$elements.height($cells.width());
}
// Square cells first
square();
// and keep them square.
$(window).off('resize').resize(square);
// Save options.
notbot.saveOptions();
notbot.start();
}
// Don't use 'display: none', because it ruins 'display: table'.
function setup() {
// Initially hide the third, fourth and fifth bot
$('.five, .four, .three').hide();
// and then show as many as the user selected.
switch ($('#options input[name="bot-count"]:checked').val()) {
case '5':
$('.five').show();
/* falls through */
case '4':
$('.four').show();
/* falls through */
case '3':
$('.three').show();
/* falls through */
case '2':
break;
default:
throw new Error('Invalid bot count!');
}
start();
}
notbot.loadOptions();
// If there were no saved options, set a default value.
if ($('#options input[name="bot-count"]:checked').length === 0) {
$('#four').prop('checked', true);
}
// Let the game begin.
setup();
$('#options input[name="bot-count"]').change(setup);
$('#options input[name="bump"]').change(start);
$('.restart-button').click(start);
}(jQuery, notbot));
</script>
<!-- Adblock detection -->
<script type="text/javascript" src="js/ads.js"></script>
<script type="text/javascript">
(function() {
if (!window.noAdblock) {
// Adblock detected!
} else {
}
}());
</script>
</body>
</html>