-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnand.html
306 lines (292 loc) · 17.8 KB
/
nand.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
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html>
<html manifest="cache.appcache">
<head>
<!-- Google AdSense -->
<!-- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-8867295535145885",
enable_page_level_ads: true
});
</script> -->
<meta charset="UTF-8">
<meta name="author" content="import-this">
<meta name="application-name" content="NAND">
<meta name="description" content="A small collection of simple logic puzzle games - #xor">
<meta name="keywords" content="xor, xnor, nand, not, game, games, puzzle, puzzles,
2D, HTML, HTML5, 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/xor/nand.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="XOR" />
<meta property="og:site_name" content="XOR" />
<meta property="og:image" content="https://import-this.github.io/xor/img/wallpaper.png" />
<meta property="og:description" content="Convert all 0's to 1's - #nand" />
<title>NAND - Convert all 0's to 1's</title>
<link rel="stylesheet" type="text/css" href="css/xor.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/xor.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-1', '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">
<h1 id="nand">NAND</h1>
<div id="description">
<div id="instructions">
<p id="rules">
When you <strong>click</strong> on <span class="first">1</span>, its neighboring<br/>
<span class="second">0</span>'s become <span class="second">1</span>'s and
<span class="second">1</span>'s become <span class="second">0</span>'s.<br/>
When you <strong>click</strong> on <span class="first">0</span>, its neighboring<br/>
<span class="second">0</span>'s (if any) become <span class="second">1</span>'s.
</p>
<strong id="goal">Convert all 0's to 1's.</strong>
</div>
</div>
<div id="annotation">
Like this puzzle? You may also like <a href="not.html">NOT</a>!
<button class="close-button" type="button">x</button>
</div>
<div class="ad">
<!-- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> -->
<!-- XOR Responsive -->
<!-- <ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-8867295535145885"
data-ad-slot="4559814851"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> -->
</div>
<div id="options" class="options">
<div class="radios">
<input id="four" type="radio" name="grid-size" value="4">
<label for="four"><span></span>4 x 4</label>
<input id="five" type="radio" name="grid-size" value="5">
<label for="five"><span></span>5 x 5</label>
<input id="six" type="radio" name="grid-size" value="6" checked>
<label for="six"><span></span>6 x 6</label>
</div>
<div class="checkboxes">
<input id="circular" type="checkbox" name="neighborhood" value="circular" checked>
<label for="circular"><span></span>Wrap around at the edges</label>
<input id="diagonal" type="checkbox" name="neighborhood" value="diagonal">
<label for="diagonal"><span></span>Include diagonal neighbors</label>
</div>
</div>
<div>
<div id="start-restart" class="start-restart">
<button class="start-button" name="start" type="button">New Game</button>
<button class="restart-button" name="restart" type="button">Restart</button>
</div>
<div id="stats">
<div>
<div id="move-count" class="buttonlike">Moves: <span>0</span></div>
<div id="best-move-count" class="buttonlike">Best: <span>N/A</span></div>
</div>
<div>
<div id="score" class="buttonlike">Points: <span>10000</span></div>
<div id="high-score" class="buttonlike">Best: <span>N/A</span></div>
</div>
</div>
</div>
</header>
<div id="game-container">
<div id="grid-container">
<table id="grid">
<tr class="row">
<td id="p-0-0" class="cell"><div></div></td>
<td id="p-0-1" class="cell"><div></div></td>
<td id="p-0-2" class="cell"><div></div></td>
<td id="p-0-3" class="cell"><div></div></td>
<td id="p-0-4" class="cell five"><div></div></td>
<td id="p-0-5" class="cell six"><div></div></td>
</tr>
<tr class="row">
<td id="p-1-0" class="cell"><div></div></td>
<td id="p-1-1" class="cell"><div></div></td>
<td id="p-1-2" class="cell"><div></div></td>
<td id="p-1-3" class="cell"><div></div></td>
<td id="p-1-4" class="cell five"><div></div></td>
<td id="p-1-5" class="cell six"><div></div></td>
</tr>
<tr class="row">
<td id="p-2-0" class="cell"><div></div></td>
<td id="p-2-1" class="cell"><div></div></td>
<td id="p-2-2" class="cell"><div></div></td>
<td id="p-2-3" class="cell"><div></div></td>
<td id="p-2-4" class="cell five"><div></div></td>
<td id="p-2-5" class="cell six"><div></div></td>
</tr>
<tr class="row">
<td id="p-3-0" class="cell"><div></div></td>
<td id="p-3-1" class="cell"><div></div></td>
<td id="p-3-2" class="cell"><div></div></td>
<td id="p-3-3" class="cell"><div></div></td>
<td id="p-3-4" class="cell five"><div></div></td>
<td id="p-3-5" class="cell six"><div></div></td>
</tr>
<tr class="row five">
<td id="p-4-0" class="cell five"><div></div></td>
<td id="p-4-1" class="cell five"><div></div></td>
<td id="p-4-2" class="cell five"><div></div></td>
<td id="p-4-3" class="cell five"><div></div></td>
<td id="p-4-4" class="cell five"><div></div></td>
<td id="p-4-5" class="cell six"><div></div></td>
</tr>
<tr class="row six">
<td id="p-5-0" class="cell six"><div></div></td>
<td id="p-5-1" class="cell six"><div></div></td>
<td id="p-5-2" class="cell six"><div></div></td>
<td id="p-5-3" class="cell six"><div></div></td>
<td id="p-5-4" class="cell six"><div></div></td>
<td id="p-5-5" class="cell six"><div></div></td>
</tr>
</table>
</div>
<div id="note">
Null move
</div>
<div id="win-screen">
<div class="center">
<div id="win">You win!</div>
<div id="win-msg-container">
<div class="high-score-msg">Awesome! You have a new high score!<br/>Share it with your friends! #nand</div>
<div class="high-score-msg">Excellent! You have a new high score!<br/>Share it with your friends! #nand</div>
<div class="high-score-msg">Brilliant! You have a new high score!<br/>Share it with your friends! #nand</div>
<div class="share-msg">Do you like NAND?<br/>Tell your friends! #nand</div>
<div class="share-msg">Do you think NAND is cool?<br/>Tell your friends! #nand</div>
<div class="share-msg">Tell your friends! #nand</div>
<div class="share-msg">Thank you for playing!</div>
<div class="share-msg">Thank you for playing! :)</div>
<div class="share-msg">Want to support NAND?<br/>Sharing is appreciated! #nand</div>
<div class="share-msg">Wanna support me?<br/>Share the game! #nand</div>
<div class="share-msg">1. Like 2. Share 3. ??? 4. Profit.</div>
<div class="share-msg">Sharing is caring.</div>
<div class="share-msg">You scored <span id="final-score"></span> points.<br/>Share it with your friends! #nand</div>
</div>
<div class="start-restart">
<button class="start-button" name="start" type="button">New Game</button>
<button class="restart-button" name="restart" type="button">Restart</button>
</div>
<div class="social">
<!-- Facebook Like and Share Buttons -->
<div class="fb-like" data-href="https://www.facebook.com/xorpuzzle/" data-layout="button" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>
<div class="fb-share-button" data-href="https://import-this.github.io/xor/nand.html" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fimport-this.github.io%2Fxor%2Fnand.html&src=sdkpreparse">Share</a></div>
<!-- Twitter Buttons -->
<a href="https://twitter.com/share" class="twitter-share-button" data-text="Play NAND and convert all 0's to 1's!" data-url="https://git.io/nand" data-via="importthat" data-hashtags="nand,xor" data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
</div>
</div>
</div>
<div class="options">
<div class="radios">
<input id="easy" type="radio" name="difficulty" value="0">
<label for="easy"><span></span>Easy</label>
<input id="normal" type="radio" name="difficulty" value="1" checked>
<label for="normal"><span></span>Normal</label>
<input id="hard" type="radio" name="difficulty" value="2">
<label for="hard"><span></span>Hard</label>
</div>
</div>
<div id="info">
<div>
If you don't get the rules right away, just click on a few
<span class="first">0</span>s and <span class="first">1</span>s
and the update pattern will become clear.
</div>
<div>
Try to solve the puzzle in as few moves and as quickly as possible.<br/>
If the game feels too easy or too hard for you, try changing the
<a href="#options">options</a> above or try one of it sibling puzzles:<br/>
<a href="not.html" title="NOT puzzle">NOT</a>,
<a href="index.html" title="XOR puzzle">XOR</a>,
<a href="xnor.html" title="XNOR puzzle">XNOR</a>.
</div>
</div>
<div class="ad">
<!-- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> -->
<!-- XOR Responsive -->
<!-- <ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-8867295535145885"
data-ad-slot="4559814851"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script> -->
</div>
<hr>
<div id="footer">
<div id="profile">
Created by <a href="https://import-this.github.io/" title="GitHub profile">import-this</a>
</div>
<div id="social" class="social">
<!-- Facebook Like, Share and Send Buttons -->
<div class="fb-like" data-href="https://www.facebook.com/xorpuzzle/" data-layout="button" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>
<div class="fb-share-button" data-href="https://import-this.github.io/xor/nand.html" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fimport-this.github.io%2Fxor%2Fnand.html&src=sdkpreparse">Share</a></div>
<div class="fb-send" data-href="https://import-this.github.io/xor/nand.html"></div>
<!-- Twitter Buttons -->
<a href="https://twitter.com/share" class="twitter-share-button" data-text="Play NAND and convert all 0's to 1's!" data-url="https://git.io/nand" data-via="importthat" data-hashtags="nand,xor" data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<a href="https://twitter.com/importthat" class="twitter-follow-button" data-show-screen-name="false" data-show-count="false">Follow @importthat</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- GitHub Star Button (https://ghbtns.com/ with modifications) -->
<iframe src="https://ghbtns.com/github-btn.html?user=import-this&repo=xor&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">
(function() {
op.setup({
operator: function nand(val, otherVal) {
return Number(!(val & otherVal));
},
prefix: 'nand',
random: true
});
}());
</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>