tims@zeus.UUCP (Tim Stoehr) (03/17/86)
The rogue clone uses the 4.2 bsd pseudo-random-number generator, random().
The old familiar rand() does not suffice, for example:
for (;;) {
printf("%d, ", rand() % 4);
}
will generate: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, . . .
This is not good enough, to say the least. This may cause the rogue
clone to get into an infinite loop when digging a maze as it tries
random directions (an integer between 0 and 3), attempting to locate
a room. Anyone running this code without the new UNIX random() routine
will have to come up with a replacement for random() that works.