-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathinput.js
More file actions
69 lines (66 loc) · 1.22 KB
/
input.js
File metadata and controls
69 lines (66 loc) · 1.22 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
const path = require('path');
const fs = require('fs');
const input = fs
.readFileSync(path.join(__dirname, 'input.txt'), 'utf8')
.toString()
.trim();
// prettier-ignore
const sampleInputs = [
{
maze:
`#########
#########`,
steps: 8,
keys: ['a', 'b'],
},
{
maze:
`########################
######################.#
#d.....................#
########################`,
steps: 86,
keys: ['a', 'b', 'c', 'd', 'e', 'f'],
},
{
maze:
`########################
#...............b.C.D.f#
#.######################
########################`,
steps: 132,
keys: ['b', 'a', 'c', 'd', 'f', 'e', 'g'],
},
{
maze:
`#################
#i.G..c...e..H.p#
########.########
#j.A..b...f..D.o#
########@########
#k.E..a...g..B.n#
########.########
#l.F..d...h..C.m#
#################`,
steps: 136,
keys: ['a', 'f', 'b', 'j', 'g', 'n', 'h', 'd', 'l', 'o', 'e', 'p', 'c', 'i', 'k', 'm'],
},
{
maze:
`########################
#@..............ac.GI.b#
###d#e#f################
###A#B#C################
###g#h#i################
########################`,
steps: 81,
keys: ['a', 'c', 'f', 'i', 'd', 'g', 'b', 'e', 'h'],
},
];
module.exports = {
input,
sampleInputs,
};