mirror of
https://github.com/seigler/advent-of-code-2020
synced 2025-07-27 08:16:08 +00:00
Initial commit
This commit is contained in:
commit
f3d555f01c
12 changed files with 370 additions and 0 deletions
24
solutions/template/solution.js
Normal file
24
solutions/template/solution.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
const path = require('path')
|
||||
const { read, position } = require('promise-path')
|
||||
const fromHere = position(__dirname)
|
||||
const report = (...messages) => console.log(`[${require(fromHere('../../package.json')).logName} / ${__dirname.split(path.sep).pop()}]`, ...messages)
|
||||
|
||||
async function run () {
|
||||
const input = (await read(fromHere('input.txt'), 'utf8')).trim()
|
||||
|
||||
await solveForFirstStar(input)
|
||||
await solveForSecondStar(input)
|
||||
}
|
||||
|
||||
async function solveForFirstStar (input) {
|
||||
const solution = 'UNSOLVED'
|
||||
report('Input:', input)
|
||||
report('Solution 1:', solution)
|
||||
}
|
||||
|
||||
async function solveForSecondStar (input) {
|
||||
const solution = 'UNSOLVED'
|
||||
report('Solution 2:', solution)
|
||||
}
|
||||
|
||||
run()
|
Loading…
Add table
Add a link
Reference in a new issue