TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BOB STOUT
from: KURT KUZBA
date: 1997-05-18 22:31:00
subject: Throw of dice

BS>   Look up ROLLDICE.C in SNIPPETS. Although it's in C, I
BS>   also have a C++ implementation saved here somewhere,
BS>   although I can't find it right this minute.
bs>...
   Thanks for the support. :)
I just posted a C++ version. The one in SNIPPETS, by the way,
may not give the full range of numbers as it should.
You really need to go one above your maximum and then subtract
one from the result before the division to ensure the full
range of integer values, 0-max.9999. Otherwise, you get a
proportionally uneven distribution on the highest allowable
value in your random routine. In short, though it did look
good, I actually screwed up again. *(- sigh -)*
Much better now, though...
> ] This Universe is 3-D captioned for the Magic Eye impaired...
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.