VI SOLVES MAZE (update)

Bill T. Cat antonyc at nntp-server.caltech.edu
Tue Jan 15 17:24:35 AEST 1991


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,"_.":" |"];}



More information about the Alt.sources mailing list