Commit graph

10 commits

Author SHA1 Message Date
Eric S. Raymond
341bf61139 Once again, take srand()/random() out of the initialization chain.
They have exactly the wrong kind of randomness for this job - not
returning consistent sequences across different platforms or C library
versions, and because pseodorandom not really better than sampling
the clock.
2017-06-13 20:43:41 +03:00
Eric S. Raymond
eb91f49dd5 Reapply "Clean up logic for exiting input loop and scoring." 2017-06-13 20:43:41 +03:00
Eric S. Raymond
06795f691f Revert SEED handling and comment orocessing. It broke database compilation.
This code is remarkably like the game it implements - a maze of twisty
little FORTRANisms, all alike.  Very easy to get lost.
2017-06-13 20:43:41 +03:00
Eric S. Raymond
9ef91255bc Clean up logic for exiting input loop and scoring. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
016bcf2ff2 Seed command fully implemented but apparently buggy.
Dwarf appearance is not yet reproducible.
2017-06-13 20:43:40 +03:00
Jason S. Ninneman
24f327cc09 Add seedable PRNG using an adaptation the original LCG algorithm. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
ec4c0c8cd0 Input source is parametrized all the way down.
This means that, potentially, do_command() could be called on any text file
pointer and the right thing would happen.
2017-06-13 20:43:40 +03:00
Eric S. Raymond
42e6e7cdb7 Fix strange inside-out organization of the input routines.
Seems to have nbben a result of FORTRAN not having anything like a
stream object that can be passed around.

A step towards logging and log replay.
2017-06-13 20:43:39 +03:00
Eric S. Raymond
6ef3e68c0c Replace fDATIME with ANSI/POSIX clock_gettime(). Rip out DOS/AMIGA shims.
The thinking here is that we simplify life by going pure ANSI/POSIX.
This is a text game.  If it ever runs on anything but Unix again it's
almost certain to be on something like WSL that supplies a
POSIX-conformant text console.
2017-06-13 20:43:39 +03:00
Eric S. Raymond
f16343f8dc Don Wood's 430-point Adventure 2.5 from 1995, from rec.games.int-fiction. 2017-06-13 20:43:39 +03:00