Skip to content

Commit 961581e

Browse files
feat(2020-day-12): solution part 2
1 parent d2b2d94 commit 961581e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

2020/day-12/solution.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ fs.readFile(filePath, { encoding: 'utf8' }, (err, initData) => {
2222
}
2323

2424
const part2 = () => {
25-
const data = resetInput()
26-
console.debug(data)
27-
return 'No answer yet'
25+
const instructions = resetInput()
26+
const destination = route({ instructions, mode: 'waypoint' })
27+
return distance({ x: 0, y: 0 }, destination)
2828
}
2929
const answers = []
3030
answers.push(part1())

0 commit comments

Comments
 (0)