(FILECREATED " 2-Dec-83 16:09:03" {PHYLUM}<LISPUSERS>MAZE.;1 2772   

      changes to:  (FNS MAZE)

      previous date: "31-DEC-00 16:01:35" {FLOPPY}MAZE.;1)


(PRETTYCOMPRINT MAZECOMS)

(RPAQQ MAZECOMS ((FNS MAZE)
		 (VARS E N S W)))
(DEFINEQ

(MAZE
  [LAMBDA (WINDOW TIM)                                       (* edited: " 2-Dec-83 16:08")
    (PROG [[MAXX (COND
		   ((WINDOWP WINDOW)
		     (WINDOWPROP WINDOW (QUOTE WIDTH)))
		   (T (BITMAPWIDTH WINDOW]
	   (MAXY (COND
		   ((WINDOWP WINDOW)
		     (WINDOWPROP WINDOW (QUOTE HEIGHT)))
		   (T (BITMAPHEIGHT WINDOW]
          (bind (X ← 10)
		(Y ← 10)
		(DX ← 10)
		(DY ← 0)
		(BM ← E)
	     do [until (AND (AND (IGEQ (IPLUS X DX)
				       10)
				 (ILEQ (IPLUS X DX)
				       MAXX)
				 (IGEQ (IPLUS Y DY)
				       10)
				 (ILEQ (IPLUS Y DY)
				       MAXY))
			    (NEQ (RAND 0 10)
				 0))
		   do (COND
			[(ZEROP DX)
			  (SETQ DY 0)
			  (SETQ DX (SELECTQ (RAND 0 1)
					    (0 (SETQ BM E)
					       10)
					    (PROGN (SETQ BM W)
						   (IMINUS 10]
			(T (SETQ DX 0)
			   (SETQ DY (SELECTQ (RAND 0 1)
					     (0 (SETQ BM N)
						10)
					     (PROGN (SETQ BM S)
						    (IMINUS 10]
		(SETQ X (IPLUS X DX))
		(SETQ Y (IPLUS Y DY))
		[BITBLT BM NIL NIL WINDOW (IPLUS X (COND
						   ((ILESSP DX 0)
						     -15)
						   ((ZEROP DX)
						     -15)
						   (T -5)))
			(IPLUS Y (COND
				 ((IGREATERP DY 0)
				   -5)
				 ((ZEROP DY)
				   -15)
				 (T -15]
		(AND (NEQ TIM T)
		     (BLOCK (OR TIM 100])
)

(RPAQ E (READBITMAP))
(20 30
"OOOOO@@@"
"OOOOO@@@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