#include <stdbool.h>
#include <getopt.h>
#include <signal.h>
+#include <time.h>
#include "main.h"
#include "database.h"
#include "misc.h"
I, INVENT, IGO, IWEST, J, JADE, K, K2, KEYS, KK,
KNFLOC, KNIFE, KQ, L, LAMP, LIMIT, LL,
LMWARN, LOC, LOCK, LOOK,
- MAGZIN, MAXDIE, MAXTRS, MESH = 123456789,
+ MAGZIN, MAXDIE, MAXTRS,
MESSAG, MIRROR, MXSCOR,
NEWLOC, NOVICE, NUGGET, NUL, NUMDIE, OBJ,
ODLOC[7], OGRE, OIL, OLDLC2, OLDLOC, OLDOBJ, OYSTER,
lcgstate.a = 1093;
lcgstate.c = 221587;
lcgstate.m = 1048576;
- long seedval = (long)time(NULL);
+ srand(time(NULL));
+ long seedval = (long)rand();
set_seed(seedval);
/* Read the database if we have not yet done so */
L1: SETUP= -1;
I=0;
- ZZWORD=RNDVOC(3,0)+MESH*2;
+ ZZWORD=RNDVOC(3,0);
NOVICE=YES(stdin, 65,1,0);
NEWLOC=1;
LOC=1;
if (sscanf(buf, "seed %ld", &sv) == 1) {
set_seed(sv);
printf("Seed set to %ld\n", sv);
+ // autogenerated, so don't charge user time for it.
+ --TURNS;
// here we reconfigure any global game state that uses random numbers
- ZZWORD=RNDVOC(3,0)+MESH*2;
+ ZZWORD=RNDVOC(3,0);
return true;
}
return false;
L18999: RSPEAK(SPK);
L19000: RSPEAK(136);
score(0);
+ return true;
}