mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2025-01-08 13:50:48 +00:00
rename function
This commit is contained in:
parent
72d329ae57
commit
3ccdd9fdf6
@ -39,7 +39,7 @@ func (g *graph) isValidCheatPosition(p point.Point) bool {
|
|||||||
slices.Contains(allowed, g.valueAt(ns[W])) && slices.Contains(allowed, g.valueAt(ns[E]))
|
slices.Contains(allowed, g.valueAt(ns[W])) && slices.Contains(allowed, g.valueAt(ns[E]))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *graph) getConnectingpoint(dir direction, p point.Point) point.Point {
|
func (g *graph) getConnectingPoint(dir direction, p point.Point) point.Point {
|
||||||
ns := neighbours(p)
|
ns := neighbours(p)
|
||||||
|
|
||||||
return ns[dir]
|
return ns[dir]
|
||||||
|
@ -45,7 +45,7 @@ func Solve(buf []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if graph.isValidCheatPosition(n) {
|
if graph.isValidCheatPosition(n) {
|
||||||
b := graph.getConnectingpoint(direction(dir), n)
|
b := graph.getConnectingPoint(direction(dir), n)
|
||||||
graph.set(n, 'X')
|
graph.set(n, 'X')
|
||||||
|
|
||||||
v1, ok := Path.Get(point)
|
v1, ok := Path.Get(point)
|
||||||
|
Loading…
Reference in New Issue
Block a user