fix scaffolding, start d3

This commit is contained in:
Leonard Lorenz 2025-12-03 10:24:15 +01:00
parent 048cc9d4c2
commit af91eb4ed5
6 changed files with 61 additions and 22 deletions

18
main.ts
View file

@ -1,8 +1,8 @@
import type { Solvable } from "./solvable.ts";
import { Day } from "./day.ts";
const solutionFiles = Deno.readDirSync('./solutions');
const solvables: Solvable[] = [];
const days: Day[] = [];
// need to wrap this stuff in a function to not trip the top level await
(async () => {
@ -12,13 +12,21 @@ const solvables: Solvable[] = [];
}
// only solve the latest day
const sortedDays = days.sort((dayL: Day, dayR: Day) => {
if (dayL.day < dayR.day) {
return -1
} else if (dayL.day > dayR.day) {
return 1
} else {
return 0
}
})
console.log("Solving latest day only:")
const day = solvables[0];
console.log(day)
const day = sortedDays.reverse()[0];
day.part1()
day.part2()
})()
export { solvables }
export { days as solvables }