fix: remove row and col loops

This commit is contained in:
Stevan Freeborn
2025-12-13 07:49:01 -06:00
parent 98cc956cc8
commit d79be2454b
+2 -7
View File
@@ -17,17 +17,12 @@ func SolvePartOne(filePath string) int {
var startPosition position.Position
for row := range grid.NumberOfRows() - 1 {
for col := range grid.NumberOfColumns() - 1 {
current := position.From(row, col)
v := grid.GetValueAt(current)
for p, v := range grid.Positions() {
if v == StartCharacter {
startPosition = current
startPosition = p
break
}
}
}
if startPosition == nil {
panic("unable to find start location")