[ (define-input x y top bottom) ; Get x and y as integers between 5 and 50 (define (bounded n) (round (max 5 (min n 50)))) (set! x (if (string? x) (bounded (or (string->number x) 30)) 30)) (set! y (if (string? y) (bounded (or (string->number y) 20)) 20)) (define title (brl-string x "x" y " Maze")) ; Now make the maze (define m (make-maze x y)) (m 'dig-randomly!) ] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE>[title]</TITLE> </HEAD> <BODY bgcolor=white> <p><table width=100%> <tr> <td><strong><a href="[(brl-source-link brl-context)]">[title]</a></strong></td> <td align="right"><a href="amaze.brl">New Maze / Choose Dimensions</a></td> </tr> </table></p> <center> <table bgcolor="white" cellspacing=0 cellpadding=0> <tr> <td><img src="[(brl-html-escape top)]"><br> <img src="/m7.png"></td> </tr> <tr> <td> [(maze-html m (brl-context-outport brl-context))] </td> </tr> <tr> <td align="right"><img src="[(brl-html-escape bottom)]"><img src="/m7.png"></td> </tr> </table> </center> </BODY> </HTML> |