TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CLIFF RHODES
from: JIM ROBIN
date: 1997-05-07 21:38:00
subject: Throw of dice

Hi Cliff,
 -=> Quoting Cliff Rhodes to Jim Robin <=-
 CR> class Di {
 CR> private:
 CR> int currentState;
 CR> public:
 CR> Di() { srand((unsigned int) time(NULL)); currentState = 1; }
 CR> int throw() { currentState = (rand() % 6) + 1;
 CR> return currentState; }
 CR> int getState() { return currentState; }
 CR> };
 ---------- cut
 Thanks for that - I'll pass this on!
 Regards,
 Jim
--- Blue Wave/386 v2.30 [NR]
---------------
* Origin: Alba Maximus, Glasgow [Line1 0141 880 7863 V34] (2:259/2)

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™.