From: utzoo!decvax!ucbvax!ARPAVAX:reeds Newsgroups: net.games.rogue Title: Rogue 5.3 Source Article-I.D.: ucbarpa.2058 Posted: Sun Sep 19 13:48:54 1982 Received: Tue Sep 21 04:07:34 1982 I consider Ken Arnold's public submission for the source of his long-awaited rogue 5.3 to net.sources, viz: main() { srand(getpid()); sleep((rand() % 120) * 60); if ((rand() % 1000000) == 0) printf("You Win!\n"); else printf("You Loose.\n"); exit(0); } to be cruel and unusual, for this reason: As soon as I read this code I set about devising a rascally way to cheat. So I asked myself, which values of getpid() will luck out? So I wrote a little program of my own: main() { int pid; for(pid=0; pid<=30000; pid++) { srand(pid); rand(); if((rand() % 1000000) == 0) printf("pid = %d\n", pid); } } I found it made NO OUTPUT. A few hours of reflection told me that this meant that Arnold's latest could be rewritten to read: main() { srand(getpid()); sleep((rand() % 120) * 60); printf("You Loose.\n"); exit(0); } without changing any observable program behavior. At last Arnold has written a cheat-proof version of rogue. RATS! PHOOIE!! Jim Reeds