Seed command fully implemented but apparently buggy.

Dwarf appearance is not yet reproducible.
This commit is contained in:
Eric S. Raymond 2017-05-24 09:06:41 -04:00
parent 65c081a0ac
commit cf219e920b
4 changed files with 19 additions and 9 deletions

5
main.c
View file

@ -58,6 +58,7 @@ static void do_command(FILE *);
int main(int argc, char *argv[]) {
int ch;
time_t starttime = time(NULL);
/* Adventure (rev 2: 20 treasures) */
@ -101,7 +102,7 @@ int main(int argc, char *argv[]) {
lcgstate.a = 1093;
lcgstate.c = 221587;
lcgstate.m = 1048576;
set_seed_from_time();
set_seed((long)starttime);
/* Read the database if we have not yet done so */
@ -134,6 +135,8 @@ L1: SETUP= -1;
LIMIT=330;
if(NOVICE)LIMIT=1000;
if (logfp)
fprintf(logfp, "seed %ld\n", starttime);
for (;;) {
do_command(stdin);
}