show final board

This commit is contained in:
mehbark 2025-04-28 13:13:00 -04:00
parent a7ddb0ff78
commit e5615419b1

View file

@ -35,7 +35,7 @@
(while (not (pq-empty? frontier))
(let-values ([(node cost) (pop!)])
(when (win? node)
(return node cost))
(return cost node))
(for-each
(lambda (neighbor)
@ -228,8 +228,7 @@
'(-1 1 0 0))))
(define (min-steps b)
(define-values (final-board steps) (ucs b board-succ board-won?))
steps)
(ucs b board-succ board-won?))
;; by David Buchweitz
(define steaming-hot
@ -278,8 +277,8 @@
(define (main . args)
(format #t "~a\n"
(min-steps (string->board (get-string-all (current-input-port))))))
(define-values (cost node) (min-steps (string->board (get-string-all (current-input-port)))))
(format #t "~a\n~a\n" cost node))
;; TODO: lol i have immutable board movement, so just make this actually playable
;; with super easy undo lol