Xref: utzoo comp.sources.wanted:14484 alt.sources.d:1163 rec.games.misc:12816 rec.games.programmer:2686 Path: utzoo!utgpu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!pikes!aspen.craycos.com!scott From: scott@craycos.com (Scott Bolte) Newsgroups: aus.games,comp.sources.wanted,alt.sources.d,rec.games.misc,rec.games.programmer Subject: Re: Maze generation Keywords: how-to maze generate program wanted Message-ID: <1990Dec13.190759.9297@craycos.com> Date: 13 Dec 90 19:07:59 GMT References: <1215@syacus.acus.oz> Organization: Cray Computer Corporation Lines: 25 > I am interested in software or algorithms for generating mazes .... 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