2025-12-19 07:42:00 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2025-12-20 13:44:07 -06:00
|
|
|
"github.com/StevanFreeborn/advent-of-code-2025/cmd/10/machine"
|
2025-12-19 07:42:00 -06:00
|
|
|
"github.com/StevanFreeborn/advent-of-code-2025/internal/file"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func SolvePartOne(filePath string) int {
|
|
|
|
|
total := 0
|
|
|
|
|
|
|
|
|
|
for line := range file.ReadLines(filePath) {
|
2025-12-20 13:44:07 -06:00
|
|
|
machine := machine.From(line)
|
|
|
|
|
buttonsPressed := machine.ConfigureLights()
|
2025-12-19 07:42:00 -06:00
|
|
|
total += buttonsPressed
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return total
|
|
|
|
|
}
|