-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
631 lines (583 loc) · 22.4 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
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta property='og:title' content='Arithmedoku'>
<meta property='og:image' content='dist/images/og_preview.png'>
<meta property='og:description' content="Arithmedoku is inspired by KenKen, a
Sudoku-like puzzle game with a fun math twist. It's beginner-friendly, yet
packed with nifty tools for power solvers.">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<link rel='stylesheet' href='dist/main.css'>
<script src='https://kit.fontawesome.com/24cc9dca36.js' crossorigin='anonymous'></script>
<script src='dist/main.js' defer></script>
<title>Arithmedoku</title>
</head>
<body>
<main class='app'>
<header class='header'>
<div class='header_left'>
<button id='header-about' class='header_button'>
about
<div class='header_dropdown header_dropdown--info'>
<p>
Arithmedoku is inspired by the popular puzzle game
<a href='https://en.wikipedia.org/wiki/KenKen'>KenKen</a>,
a Sudoku-like game with a math twist, invented by Japanese math teacher
<a href='https://en.wikipedia.org/wiki/Tetsuya_Miyamoto'>Tetsuya Miyamoto</a>.
</p>
<p>
All of the puzzles in Arithmedoku were written by Jim Bumgardner, aka Krazydad. He calls them Inkies. From
the Krazydad
<a href='https://krazydad.com/about.php'>about page</a>:
</p>
<blockquote>
This website has been offering free puzzles to the public since 2005. My mission is to provide puzzles to
under-served groups that need them, including prisoners, pensioners, home-schoolers, hospitals, churches,
and classrooms. There are currently about two million individual puzzles on the site, and over sixty
unique varieties.
</blockquote>
<p>
Check out the
<a href='https://krazydad.com/'>Krazydad website</a>, or
<a href='https://krazydad.com/inkies/'>find more Inkies</a>.
</p>
</div>
</button>
<button id='header-instructions' class='header_button'>
instructions
<div class='header_dropdown header_dropdown--list'>
<ul class='instructions-inner'>
<li class='instruction-section show'>
<h1 class='show'>Rules</h1>
<ul>
<li> Each row and column must contain each of the numbers 1 through 9, no repeats.</li>
<li> In the upper left of each cage is an arithmetic operation and result.
Performing this operation on the numbers in the cage must yield the listed
result.
</li>
<li> Click a square to select it, then use your arrows keys to move around. Place a number in a square
using your keyboard.</li>
</ul>
</li>
<li class='instruction-section'>
<h1>Info Box: Cage</h1>
<ul>
<li>
At the top is a list of all the possible combinations you think
can appear in the currently selected square's cage.. At the
bottom are 3 tabs for filtering this list of combinations. (You
can also directly eliminate a possible combination by clicking
it.)
</li>
<li>
<strong>Require All</strong>: all the selected numbers
must appear in the current cage.
</li>
<li>
<strong>Eliminate</strong>: none of the selected numbers
can appear in the current cage.
</li>
<li>
<strong>Require One</strong>: at least one of the selected numbers must
appear in the current cage.
</li>
</ul>
</li>
<li class='instruction-section'>
<h1>Info Box: Square</h1>
<ul>
<li>
Click a number to toggle whether it's a possibility for the
currently selected square.
</li>
<li>
The faded out numbers are those that can't appear in the square
because they don't appear in any possible combination for the
current cage.
</li>
<li>
Notice that, once a square has been narrowed down to just a few
possible numbers, they appear within the square in the puzzle!
</li>
<li>
You can also select multiple squares to batch eliminate
possibilities. Hold command and click another square to add it
to the current selection, or hold shift to select all the
squares in between.
</li>
</ul>
</li>
<li class='instruction-section'>
<h1>Keyboard Shortcuts</h1>
<ul class='shortcuts'>
<li>
<span class='keyboard keyboard--cream'>←↑↓→</span>
<span>
Change selected square
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>Ctrl + number</span>
<span>
Toggle possible number for current square
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>Alt + number</span>
<span>
Hold Alt & select numbers to rule *in* as
possibilities for current square (eliminates
every other number)
</span>
</li>
<li>
<span>
<span class='keyboard keyboard--cream'>Cmd + z</span> /
<span class='keyboard keyboard--cream'>Ctrl + z</span>
</span>
<span>
Undo last move
</span>
</li>
<li>
<span>
<span class='keyboard keyboard--cream'>Cmd + y</span> /
<span class='keyboard keyboard--cream'>Ctrl + y</span>
</span>
<span>
Redo last move
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>Shift + number</span>
<span>
Toggle number within currently selected Cage Info tab
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>Cmd + Shift + ←/→</span>
<span>
Change selected Cage Info tab
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>a</span>
<span>
Select the Require All tab
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>e</span>
<span>
Select the Eliminate tab
</span>
</li>
<li>
<span class='keyboard keyboard--cream'>o</span>
<span>
Select the Require One tab
</span>
</li>
</ul>
</li>
</ul>
</div>
</button>
<button id='header-options' class='header_button'>
options
<ul class='header_dropdown header_dropdown--list'>
<template id='option-template'>
<li class='option'>
<span class='option_info'>
<span class='option_info-text'>
<!-- insert text here -->
</span>
<span class='option_hover'>
<i class="info"></i>
<span class='option_hover-text'>
<!-- insert text here -->
</span>
</span>
</span>
<!-- option toggle or num input here -->
</li>
</template>
<template id='option-toggle-template'>
<span class='toggle toggle--on'>
<span class='toggle_circle'></span>
</span>
</template>
<template id='option-num-template'>
<span class='option_num'>
<input class='option_num-input'></input>
</span>
</template>
</ul>
</button>
</div>
<h1 id='title'>Arithmedoku</h1>
<div class='header_right'>
<button id='header-undo' class='header_button'>undo</button>
<button id='header-redo' class='header_button'>redo</button>
<button id='header-new' class='header_button'>new</button>
<button id='header-reset' class='header_button'>reset</button>
</div>
</header>
<section class='game'>
<div class='puzzle'>
<template id='square-template'>
<div class='square' tabindex='-1'>
<span class='square_cage-top'></span>
<span class='square_cage-left'></span>
<span class='square_label'></span>
<span class='square_value'></span>
<ol class='square_possibilities'>
<li class='square_possibility'></li>
<!-- more square possibilities here -->
</ol>
</div>
</template>
<!-- squares cloned from template go here -->
</div>
<div class='info-box'>
<template id='info-label-template'>
<svg class="info_label" viewBox="0 0 100 28">
<path d="
M 0,0
h 100
l -12,12
l 12,12
h -100
z
" />
<polygon points="
0,24
7,24
7,28
" />
<text x="15" y="45%" dominant-baseline="middle">
<!-- insert text here -->
</text>
</svg>
</template>
<!-- labels cloned from template go here -->
<ol class='square-info'>
<template id='square-info_possibility-template'>
<li class='square-info_possibility' data-val=''>
<span class='possibility-icon no-hover'>
<i class='circle'></i>
</span>
<span class='possibility-icon hover'>
<i class='ban'></i>
</span>
<span class='square-info_possibility-val'>
<!-- insert val here -->
</span>
</li>
</template>
<!-- possibilities cloned from template go here -->
<button id='square-info_select-only' class='square-info_btn'>
<i class='select'></i>
</button>
<button id='square-info_clear' class='square-info_btn'>
<i class='clear'></i>
</button>
</ol>
<div class='collection-info'>
<div class='collection-combos'>
<ul class='combos_list'>
<template id='combo-template'>
<li class='combo' tabindex='-1'>
</li>
</template>
<!-- combos cloned from template go here -->
</ul>
</div>
<div class='collection-filter'>
<ul class='filter-tabs'>
<button id='filter-and' class='filter_mode-btn'>
Require All <span class='keyboard'>a</span>
</button>
<button id='filter-not' class='filter_mode-btn'>
Eliminate <span class='keyboard'>e</span>
</button>
<button id='filter-or' class='filter_mode-btn'>
Require One <span class='keyboard'>o</span>
</button>
<span id='filter-tab-underline'></span>
</ul>
<ol class='filter-possibilities'>
<template id='filter-possibility-template'>
<li class='filter-possibility' data-val=''>
<div class='possibility-icons possibility-icons--no-hover'></div>
<div class='possibility-icons possibility-icons--hover'></div>
<span class='filter-possibility_val'></span>
</li>
</template>
<!-- possibilities cloned from template go here -->
<button id='filter-clear-mode' class='filter_btn'>
<i class='reset'></i>
</button>
<button id='filter-clear-all' class='filter_btn'>
<i class='clear'></i>
</button>
</ol>
</div>
</div>
</div>
</section>
<footer>
<aside id='attribution'>
<span>
puzzles by
<a href='https://www.krazydad.com' target='_blank' rel='noreferrer'>Jim Bumgardner, aka Krazydad</a>
</span>
</aside>
<aside id='links'>
<span>
made by
<!-- <a href='https://gorterd.github.io' target='_blank' rel='noreferrer'> -->
Daniel Gorter
<!-- </a> -->
</span>
<span class='about-icons'>
<a href='https://www.github.com/gorterd' target='_blank' rel='noreferrer'>
<i class='github'></i>
</a>
<a href='https://www.linkedin.com/in/daniel-gorter/' target='_blank' rel='noreferrer'>
<i class='linkedin'></i>
</a>
<a href='https://angel.co/u/daniel-gorter' target='_blank' rel='noreferrer'>
<i class='angel'></i>
</a>
</span>
</aside>
</footer>
</main>
<p id='no-render'>
Unfortunately, Arithmedoku cannot render at this size. Your window must be at
least 900px wide and 600px tall.
If you are viewing this on mobile, please switch to a laptop or desktop.
</p>
<template id='spotlight-template'>
<svg class='spotlight-frame'>
<defs>
<filter id='border'>
<feGaussianBlur stdDeviation='2' />
</filter>
</defs>
<path fill-rule='evenodd' filter='url(#border)' />
</svg>
</template>
<template id='spotlight-caption-template'>
<div class='spotlight-caption'>
<div class='caption-controls'>
<div>
<button id='spotlight-previous'>
<i class='fas fa-arrow-left'></i>
</button>
<button id='spotlight-next'>
<i class='fas fa-arrow-right'></i>
</button>
</div>
<button id='spotlight-finish'>
Done
</button>
</div>
</div>
</template>
<template id='caption-content-intro-template'>
<div class='caption-content caption-content--intro'>
<h1>Welcome to Arithmedoku!</h1>
<p>
Let's start with a walkthrough!
</p>
<p>
Go forward and back with the <strong>→</strong> and <strong>←</strong>
buttons, or by using your arrow keys.
</p>
<p>
Click <strong>Done</strong> or hit Enter to finish the walkthrough.
</p>
</div>
</template>
<template id='caption-content-puzzle-template'>
<div class='caption-content caption-content--puzzle'>
<p>
This is the <strong>puzzle</strong>. Your goal is to fill every square with the
correct number. Every row and column must contain the numbers 1 through 9, no repeats.
</p>
</div>
</template>
<template id='caption-content-cage-template'>
<div class='caption-content caption-content--cage'>
<p>
This is a <strong>cage</strong>. Each cage has an arithmetic operation and
result written in its upper left corner.
</p>
<p>
Performing this operation on the
numbers in the cage <em>must</em> yield the listed result.
</p>
<p>
So in this cage, the three squares must add up to 15.
</p>
</div>
</template>
<template id='caption-content-info-template'>
<div class='caption-content caption-content--info'>
<p>
This is the <strong>info box</strong>, where you can reason
about the puzzle, narrowing down which numbers can appear in a square
and which combinations of numbers can appear in a cage.
</p>
</div>
</template>
<template id='caption-content-cage-info-combos-template'>
<div class='caption-content caption-content--cage-info-combos'>
<p>
This is the <strong>cage info</strong> section. On top, we have
a list of every possible combination of numbers that could appear in the
current cage.
</p>
<p>
This list is currently filtered to only show combinations that are
mathematically possible (i.e. numbers that add up to 15), but this is an
option you can turn off.
</p>
</div>
</template>
<template id='caption-content-cage-info-tabs-template'>
<div class='caption-content caption-content--cage-info-tabs'>
<p>
At the bottom, we have 3 tabs, representing 3 different ways we can narrow
down our possible combinations. Let's take a closer look.
</p>
</div>
</template>
<template id='caption-content-cage-info-and-template'>
<div class='caption-content caption-content--cage-info-and'>
<ol>
<li>
<strong>Require All</strong>: all the selected numbers
must appear in the current cage. (We've narrowed the possible combinations to
those with a <strong>4</strong>.)
</li>
</ol>
</div>
</template>
<template id='caption-content-cage-info-not-template'>
<div class='caption-content caption-content--cage-info-not'>
<ol>
<li>
<strong>Require All</strong>: all the selected numbers
must appear in the current cage.
</li>
<li>
<strong>Eliminate</strong>: none of the selected numbers
can appear in the current cage. (We've eliminated combinations with
<strong>1</strong>, <strong>6</strong>, or <strong>8</strong>.)
</li>
</ol>
</div>
</template>
<template id='caption-content-cage-info-or-template'>
<div class='caption-content caption-content--cage-info-or'>
<ol>
<li>
<strong>Require All</strong>: all the selected numbers
must appear in the current cage.
</li>
<li>
<strong>Eliminate</strong>: none of the selected numbers
can appear in the current cage.
</li>
<li>
<strong>Require One</strong>: at least one of the selected numbers must
appear in the current cage. (We've narrowed the possible combinations to
those with either a
<strong>2</strong> or a <strong>7</strong>.)
</li>
</ol>
</div>
</template>
<template id='caption-content-cage-info-all-filters-template'>
<div class='caption-content caption-content--cage-info-all-filters'>
<ol>
<li>
<strong>Require All</strong>: all the selected numbers
must appear in the current cage.
</li>
<li>
<strong>Eliminate</strong>: none of the selected numbers
can appear in the current cage.
</li>
<li>
<strong>Require One</strong>: at least one of the selected numbers must
appear in the current cage.
</li>
</ol>
<p>
Combining all 3 filters, we're down to 2 possible combinations; nice!
</p>
<p>
One last tip: click the <strong>⟲</strong> button to reset the currently selected
filter, or the eraser button to reset all filters.
</p>
</div>
</template>
<template id='caption-content-square-info-template'>
<div class='caption-content caption-content--square-info'>
<p>
This is the <strong>square info</strong> section. Click a number to toggle
whether it's a possibility for the current square. Click the eraser button to
reset the possibilities.
</p>
<p>
To narrow possibilities down more quickly, click the <strong>☑</strong> button and then
select numbers to rule <strong>in</strong> as possibilities (thus ruling
out every other number). Click <strong>☑</strong> again to confirm.
</p>
<p>
The faded out numbers are those that can't appear in the square because
they don't appear in any possible combination for the current cage.
</p>
</div>
</template>
<template id='caption-content-selection-info-template'>
<div class='caption-content caption-content--selection-info'>
<p>
You can also select multiple squares to batch eliminate possibilities. Cool!
</p>
</div>
</template>
<template id='caption-content-options-template'>
<div class='caption-content caption-content--options'>
This is the options menu. Go ahead and hover over the info icon next to each
option to learn what it does!
</div>
</template>
<template id='caption-content-instructions-template'>
<div class='caption-content caption-content--instructions'>
<p>
Lastly, the instructions dropdown contains the key info from the walkthrough and more.
</p>
<p>
Be sure to check out the keyboard shortcuts!
</p>
<p>
If you'd like to go through this walkthrough again, just refresh the page! (Or turn off the walkthrough in
options.)
</p>
<p>
Good luck!
</p>
</div>
</template>
</body>
</html>