comments removed

This commit is contained in:
mtrx 2024-12-06 03:07:32 +01:00
parent bd4374c810
commit 3c8fea51a8

View file

@ -14,7 +14,6 @@ class DayThree implements Solvable {
.map(arr => Number.parseInt(arr))
}
public part1(): Solvable {
const re = /mul\([0-9]{1,3},[0-9]{1,3}\)/g
// get all matches and parse them to int[]
@ -33,7 +32,6 @@ class DayThree implements Solvable {
let active = true
let result = 0
for (const inst of instructions) {
console.log((active ? '' : 'skipping ') + inst )
if (inst === 'do()') {
active = true
continue
@ -45,8 +43,6 @@ class DayThree implements Solvable {
if (active) {
const [left, right] = this.multiplyInstruction(inst)
result += left * right
console.log((active ? 'multiplying ' : '' ), left, right)
console.log(left, right)
}
}
console.log(result)