A* search algorithm: Difference between revisions
Content added Content deleted
m (→{{header|OCaml}}: just a typo) |
m (Ol: small simplification) |
||
Line 1,711: | Line 1,711: | ||
(+ (<< (car xy) 16) (cdr xy))) |
(+ (<< (car xy) 16) (cdr xy))) |
||
; |
; "is the cell is empty?" |
||
(define (floor? x y) |
(define (floor? x y) |
||
(let ((line ( |
(let ((line (list-ref level y))) |
||
(if ( |
(if line (not (eq? (list-ref line x) 1))))) |
||
(eq? (lref line x) 0)))) |
|||
(unless (equal? from to) ; search not finished yet |
(unless (equal? from to) ; search not finished yet |