#pragma once #include "h-basic.h" /**** Available constants ****/ /* * Random Number Generator -- Degree of "complex" RNG -- see "misc.c" * This value is hard-coded at 63 for a wide variety of reasons. */ #define RAND_DEG 63 /**** Available Variables ****/ extern bool_ Rand_quick; extern u32b Rand_value; extern u16b Rand_place; extern u32b Rand_state[RAND_DEG]; /**** Available Functions ****/ void Rand_state_init(u32b seed); s32b Rand_mod(s32b m); s16b randnor(int mean, int stand); s32b damroll(s16b num, s16b sides); s32b maxroll(s16b num, s16b sides); /** * Evaluate to "true" p percent of the time. */ bool magik(s32b p); /* * Generates a random long integer X where O<=X