8000 feat(2022-day-02): solution for part 2, calculating match score based… · developher-net/advent-of-code@a01f2b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit a01f2b4

Browse files
feat(2022-day-02): solution for part 2, calculating match score based on strategic win/loss guide
1 parent d22be13 commit a01f2b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

2022/day-02/solution.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs')
22
const path = require('path')
33
const filePath = path.join(__dirname, 'input.txt')
44
const { inputToArray, linesToArray } = require('../../2018/inputParser')
5-
const { scoreMatch } = require('./rochambeau')
5+
const { scoreMatch, strategizeMatch } = require('./rochambeau')
66

77
fs.readFile(filePath, { encoding: 'utf8' }, (err, initData) => {
88
if (err) throw err
@@ -21,8 +21,7 @@ fs.readFile(filePath, { encoding: 'utf8' }, (err, initData) => {
2121

2222
const part2 = () => {
2323
const data = resetInput()
24-
console.debug(data)
25-
return 'No answer yet'
24+
return strategizeMatch(data)
2625
}
2726
const answers = []
2827
answers.push(part1())

0 commit comments

Comments
 (0)
0