day 18 puzzle 2

This commit is contained in:
2024-12-18 21:07:30 +01:00
parent 43c6d9e325
commit 953716b95a
5 changed files with 119 additions and 7 deletions

View File

@@ -7,10 +7,6 @@
(0, -1)
)
#let get-coords(x, y) = {
return str(x) + "/" + str(y)
}
#let get-lowest(nodes, scores) = {
let lowest-score = none
let lowest-i = none
@@ -41,8 +37,7 @@
return path
}
#let find-path(w, h, grid, start: (0, 0), end: auto) = {
let end = if end == auto {(w - 1, h - 1)} else {end}
#let find-path(w, h, grid) = {
let end = (w - 1, h - 1)
let (x, y) = (0, 0)
let open = ((x, y),)