Make 1995/cdua easier to see with modern systems

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.
This commit is contained in:
Cody Boone Ferguson committed 2023-04-11 12:04:49 -07:00
1 parent 2474269674
commit 4f022b6963
3 files changed
+28 -14

No files matched your search

+21 -11
View File
@@ -1,27 +1,37 @@
# Best Output
Carlos Duarte
Instituto Superior Tecnico
Largo da Igreja, 5 R/C DTo
Damaia
2720 Amadora
Portugal
Carlos Duarte
Instituto Superior Tecnico
Largo da Igreja, 5 R/C DTo
Damaia
2720 Amadora
Portugal
## To build:
make all
```sh
make all
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this so that it
would work with macOS. Once it could compile it additionally segfaulted under
macOS which he also fixed. Thank you Cody for your assistance!
NOTE: on modern systems this was hard to see it solve it in real time because it
goes so quickly so Cody added a macro `Z` defaulting to 3000 for a call to
`usleep()` to make it easier to see. The `Z` macro lets you configure it in case
you find it too slow or too fast. To do that:
## To run
```sh
make CFLAGS+="-DZ=1500" clobber all
```
./cdua
## To run:
```sh
./cdua
```
NOTE: on modern systems this might be hard to see it solve it in running time as
it goes so quickly but it will still show the result after execution.
NOTE: sometimes the program needs you to press enter a second time to continue
solving the maze. See [bugs.md](/bugs.md) for more details.