bool oldstyle = false;
bool editline = true;
bool prompt = true;
-lcg_state lcgstate;
extern void initialise();
extern void score(long);
/* Initialize our LCG PRNG with parameters tested against
* Knuth vol. 2. by the original authors */
- lcgstate.a = 1093;
- lcgstate.c = 221587;
- lcgstate.m = 1048576;
+ game.lcg_a = 1093;
+ game.lcg_c = 221587;
+ game.lcg_m = 1048576;
srand(time(NULL));
long seedval = (long)rand();
set_seed(seedval);
* get full score. */
{
if (!DARK(game.loc)) {
- long obj;
++game.abbrev[game.loc];
for (int i=game.atloc[game.loc]; i != 0; i=game.link[i]) {
- obj=i;
+ long obj=i;
if (obj > NOBJECTS)obj=obj-NOBJECTS;
if (obj == STEPS && TOTING(NUGGET))
continue;