₍^. .^₎⟆

This commit is contained in:
Leonard Lorenz 2025-12-02 22:20:36 +01:00
commit f33dda8916
10 changed files with 158 additions and 0 deletions

22
main.ts Normal file
View file

@ -0,0 +1,22 @@
import type { Solvable } from "./solvable.ts";
const solutionFiles = Deno.readDirSync('./solutions');
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) {
await import('./solutions/' + solution.name)
}
// only solve the latest day
console.log("Solving latest day only:")
const day = solvables.toReversed()[0];
day.part1()
day.part2()
})()
export { solvables }