daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;;generate-maze: num -> Maze
  2. (define (generate-maze n)
  3.   (local [(define (generate-maybedoor dummy)
  4.             (if (> (random 10) 5) #f (generate-maze (sub1 n))))]
  5.     (cond [(zero? n) #f]
  6.           [else (make-room (generate-maybedoor 0) (generate-maybedoor 0)
  7.                            (generate-maybedoor 0) (generate-maybedoor 0))])))
  8. #;to remove dead ends
  9. (define (room=? r1 r2)
  10.   (andmap ( r1 r2))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top