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

View file

@ -1,12 +1,13 @@
import { solvables } from "../main.ts";
import type { Solvable } from "../solvable.ts";
import { Day } from "../day.ts";
import { readInput } from "../utils.ts";
class DayOne implements Solvable {
class DayImpl implements Day {
day = 1
input = readInput('01')
public part1(): DayOne {
public part1(): Day {
const vals: [string, number][] = this.input
.split("\n")
.map(line => [line[0], Number.parseInt(line.slice(1))]);
@ -27,7 +28,7 @@ class DayOne implements Solvable {
return this
}
public part2(): DayOne {
public part2(): Day {
const vals: [string, number][] = this.input
.split("\n")
.map(line => [line[0], Number.parseInt(line.slice(1))]);
@ -56,4 +57,4 @@ class DayOne implements Solvable {
}
}
solvables.push(new DayOne())
solvables.push(new DayImpl())