VI SOLVES MAZE (update)

mdivax1!bb29c!mitchell mdivax1!bb29c!mitchell
Wed Jan 16 02:21:01 AEST 1991


In article <1991Jan15.062435.22908 at nntp-server.caltech.edu> antonyc at nntp-server.caltech.edu (Bill T. Cat) writes:
>gregm at otc.otca.oz.au (Greg McFarlane) writes:
>
>>Anyone who can't get the maze.c file to compile, get a new compiler. 
>
>i was playing with the maze.c thing, and the problem with it on
>most systems is that it is not ansi compatible.  so, the nerd that
>i am, i fixed it for ansi.  it's not quite as pretty, but hey, it works.
>
>
>    char*M,A,Z,E=40,J[80],T[3];main(C){for(M=J+E,*J=A=scanf("%d",&
>    C)            ;--            E;J             [E            ]=M
>    [E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
>    )    ,   A    =              39              ,C             --
>    )    ;   Z    ||    printf   (T   ))T[Z]=Z[A-(E   =A[J-Z])&&!C
>    &    A   ==             M[                                  A]     
>    |6<<11<rand()||!C&!Z?J[M[E]=M[A]]=E,J[M[A]=A-Z]=A,"_.":" |"];}

also, let's make the change between 27 and 11 (or whatever) automatic.

    |6<<8*sizeof(int)-5<rand()||!C&!Z?J[M[E]=M[A]]=E,J[M[A]=A-Z]=A,"_.":" |"];}

I'll leave the cute reformatting to someone more artistic than I.

-- 
mitchell at mdi.com (Bill Mitchell)



More information about the Alt.sources mailing list