This is to both preserve the original code (notwithstanding the bug
fixes I made) and also to allow you to compare the two versions. I now
have played with even slower values and I recommended trying it to see
different results in the README.md (which of course describes the alt
code, how to use it and reconfigure it etc.).
It's encouraged to use this version but it's also recommended to try the
original version as well.
Updated Makefile to do this. This reinstates the -include stdio.h
-include unistd.h in CINCLUDE but the -DZ=3000 is still in the CDEFINE
variable. Why? It doesn't hurt having it in the cdua.c compilation and
it makes it easier to find. The cdua.alt.c still uses #include
directives so that redefining CFLAGS at compilation does not cause any
problems.
Thank you Landon for recommending that it's moved to an alt version; I
had thought of it but did not do it and this is much, much better!
As modern systems are so much faster it's hard to see the maze being
solved in real time so I added a call to usleep() with a macro defined
in the Makefile (a macro in case someone finds it too slow or too fast
or wants to do some strange experiment like setting it to 40000 which I
actually tried). Called Z it defaults to 3000. To change it do something
like:
make CFLAGS+="-DZ=1500" clobber all
To do this I had to remove the -include ... from the Makefile and
instead add the proper #includes to the source code as the += was not
concatenating to the CFLAGS.
This makes the entry a bit more enjoyable with current systems. There
still is a known issue that I'll look at again another time.
It took two things: get it to compile and then remove bad function
prototypes which were causing a segfault. It worked under linux and of
course it still does.
We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.