}
game.conds = setbit(11);
- /* Start-up, dwarf stuff */
- make_zzword(game.zzword);
-
return seedval;
}
printf("Seed set to %ld\n", sv);
// autogenerated, so don't charge user time for it.
--game.turns;
- // here we reconfigure any global game state that uses random numbers
- make_zzword(game.zzword);
return true;
}
return false;
return (at);
}
-/* Utility routines (SETBIT, TSTBIT, set_seed, get_next_lcg_value,
- * randrange, RNDVOC) */
+/* Utility routines (setbit, tstbit, set_seed, get_next_lcg_value,
+ * randrange) */
long setbit(long bit)
/* Returns 2**bit for use in constructing bit-masks. */
/* Set the LCG seed */
{
game.lcg_x = (unsigned long) seedval % game.lcg_m;
+
+ // once seed is set, we need to generate the Z`ZZZ word
+ make_zzword(game.zzword);
}
unsigned long get_next_lcg_value(void)
rspeak(VERSION_SKEW, save.version / 10, MOD(save.version, 10), VRSION / 10, MOD(VRSION, 10));
} else {
memcpy(&game, &save.game, sizeof(struct game_t));
- //game.zzword = rndvoc(3, game.zzword);
- make_zzword(game.zzword);
}
return GO_TOP;
}