feat: solve day 1 part 1

This commit is contained in:
Stevan Freeborn
2025-12-01 06:49:26 -06:00
parent 2734425a33
commit df4bd2cfa3
10 changed files with 297 additions and 3 deletions
+24 -1
View File
@@ -1,5 +1,28 @@
package main
import (
"github.com/StevanFreeborn/advent-of-code-2025/cmd/01/dial"
"github.com/StevanFreeborn/advent-of-code-2025/cmd/01/instruction"
"github.com/StevanFreeborn/advent-of-code-2025/internal/file"
)
func SolvePartOne(filePath string) int {
return 0
lines := file.ReadLines(filePath)
dial := dial.New()
total := 0
for _, line := range lines {
if line == "" {
continue
}
instruction := instruction.FromLine(line)
dial.Turn(instruction)
if dial.Value() == 0 {
total++
}
}
return total
}