DON'T EVER DO THIS!!!

Ihnat ignatz at aicchi.UUCP
Thu Aug 1 11:53:18 AEST 1985


I won't mention what program this comes from; it's been posted to the
net, and (functionally) is quite interesting and enjoyable.  BUT--it
mysteriously broke the 'C' compiler on an Altos 586 running Xenix 3.0b,
and when I looked at it---well, you take a look.  DON'T *EVER* DO THIS!!
		 .
		 .
		 .
        while (--count &&

               (!(rand_mod(prob)) ||

                (obj = occupant[y=(curkl->posy+curkl->vely+YSIZE00)%YSIZE]

                               [x=(curkl->posx+curkl->velx+XSIZE00)%XSIZE]) &&

                (obj->type == Star ||

                 ((rand_mod(100) <= smarts) &&

                  !obj->vely && !obj->velx &&

                  (obj->image == 'o' ||

                   obj->image == 'O' ||

                   obj->image == 'X'

                  )

                 ) ||

                 (obj->type == Web &&

                  (curkl->image != 'T' ||

                   (count > 5 && obj->image ==

                    (curkl->vely?

                     (curkl->velx?

                      (curkl->velx==curkl->vely?

                       '\\'

                      :

                       '/'

                      )

                     :

                      '|'

                     )

                    :

                     '-'

                    )

                   )

                  )

                 )

                )

               )

              ) {

            if (massacre && curkl->image != 'T') {

                curkl->vely = rand_mod(7) - 3;

                curkl->velx = rand_mod(7) - 3;

            }

            else if (curkl->energy >= 2500 && curkl->image != 'T') {

                curkl->vely = rand_mod(5) - 2;

                curkl->velx = rand_mod(5) - 2;

            }

            else {

                curkl->vely = rand_mod(3) - 1;

                curkl->velx = rand_mod(3) - 1;

            }

        }

================================> *WHEW!* <==============================



More information about the Comp.lang.c mailing list