looks about right

This commit is contained in:
mtrx 2024-12-07 23:07:55 +01:00
parent 3abf3f3bce
commit 3f33f23c96
4 changed files with 32 additions and 18 deletions

View file

@ -7,13 +7,13 @@ const solvables: Solvable[] = [];
// need to wrap this stuff in a function to not trip the top level await
(async () => {
// cool dynamic module loading
for (const solution of solutionFiles){
for (const solution of solutionFiles) {
await import('./solutions/' + solution.name)
}
if (import.meta.main) {
// only solve the latest day
solvables.toReversed()[0].part1().part2()
solvables.toReversed()[0].part1().then(solvable => solvable.part2())
}
})()