Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!zephyr!tektronix!orca!frip!andrew From: andrew@frip.WV.TEK.COM (Andrew Klossner) Newsgroups: comp.sources.games.bugs Subject: Re: v07i018: poker - five card draw poker, Part01/02 Message-ID: <3898@orca.WV.TEK.COM> Date: 14 Jul 89 19:42:47 GMT References: <4232@tekred.CNA.TEK.COM> Sender: nobody@orca.WV.TEK.COM Organization: Tektronix, Wilsonville, Oregon Lines: 14 Any program with a formula like ((rand()%100 < 30) ? 10:11); is going to behave oddly. The low order bits of the numbers returned by rand() are not "random" in the sense that gamesters mean. Either use random() instead, or use something like (((double)rand()/2147483648.0 < 0.30) ? 10:11); so that you don't discard the significant bits. -=- Andrew Klossner (uunet!tektronix!frip.WV.TEK!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]