mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2025-04-19 18:53:46 +01:00
Compare commits
2 Commits
cc6a0942fb
...
af3e483382
Author | SHA1 | Date | |
---|---|---|---|
af3e483382 | |||
f5ad468db5 |
@ -92,7 +92,7 @@ func mapPoints(lines []string) {
|
||||
}
|
||||
}
|
||||
|
||||
// walk moves along the pipes storing poinst that mark loop locations
|
||||
// walk moves along the pipes storing points that mark loop locations
|
||||
// it also keeps a track of last two moves
|
||||
// returns the number of steps to traverse all pipes
|
||||
func walk(tracker tracker) int {
|
||||
|
@ -44,6 +44,7 @@ func shortestRoute(a, b coords, factor int) int {
|
||||
}
|
||||
} else {
|
||||
if row >= b.Y && row < a.Y {
|
||||
log.Debug("empty row, adding to vert")
|
||||
vert += (factor - 1)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user