-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.js
38 lines (29 loc) · 827 Bytes
/
template.js
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
'use strict'
const { assert, loadData, parseInt } = require('./core/utils')
const rawInput = [loadData(module.filename), 0, 0, 0]
const parse = (dsn) => {
let data = rawInput[dsn]
if (data && (data = data.split('\n').filter(v => Boolean(v))).length) {
return data
}
return data // NOTE: The runner will distinguish between undefined and falsy!
}
/** @typedef {*} TData */
/**
* @param {TData[]} input
* @param {TOptions} options
*/
const puzzle1 = (input, options) => {
return options && undefined
}
/** @param {TData[]} input */
const puzzle2 = (input) => {
return undefined
}
// Example (demo) data.
rawInput[1] = ``
// Uncomment the next line to disable demo for puzzle2 or to define different demo for it.
// rawInput[2] = ``
module.exports = { parse, puzzles: [puzzle1, puzzle2] }
/*
*/