Xref: utzoo alt.sources.d:1179 rec.games.misc:12853 rec.games.programmer:2701 Path: utzoo!utgpu!cs.utexas.edu!tut.cis.ohio-state.edu!att!pacbell.com!pacbell!pyramid!infmx!cortesi From: cortesi@informix.com (David Cortesi) Newsgroups: alt.sources.d,rec.games.misc,rec.games.programmer Subject: Re: Maze generation Keywords: how-to maze generate program wanted Message-ID: <1990Dec14.001604.20990@informix.com> Date: 14 Dec 90 00:16:04 GMT References: <1215@syacus.acus.oz> <1990Dec13.190759.9297@craycos.com> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 26 In article <1990Dec13.190759.9297@craycos.com> scott@craycos.com (Scott Bolte) writes: > > Believe it or not the following C code can generate unique > mazes of arbitrary size. Extract the code and compile it. When > you run it just give a number, after you run it, not on the > command line. > > I do not know where it came from but I have had it for at least > a year. > >char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C); >-- E; J[ E] =T >[E ]= E) printf("._"); for(;(A-=Z=!Z) || (printf("\n|" >) , A = 39 ,C -- >) ; Z || printf (M ))M[Z]=Z[A-(E =A[J-Z])&&!C >& A == T[ A] >|6<<27