chore(day17): fix missing changes
All checks were successful
Go Test / build (pull_request) Successful in 37s
Go Bump / bump (push) Successful in 7s
Go Test / build (push) Successful in 34s

This commit was merged in pull request #20.
This commit is contained in:
xuu
2024-01-01 09:57:08 -07:00
parent 86f2f7a6f2
commit 0d78959bea
2 changed files with 24 additions and 9 deletions

View File

@@ -129,9 +129,16 @@ func (g *graph) Potential(a, b position) int16 {
return aoc.ManhattanDistance(a.loc, b.loc)
}
func (g *graph) Target(a position) bool {
if a.loc == g.target && a.steps >= g.min {
return true
}
return false
}
// Seen attempt at simplifying the seen to use horizontal/vertical and no steps.
// It returns correct for part1 but not part 2..
// func (g *pather) Seen(a position) position {
// func (g *graph) Seen(a position) position {
// if a.direction == U {
// a.direction = D
// }