On Mar 3, 2007, at 9:38 PM, realbasic-nug- 
[EMAIL PROTECTED] wrote:

> Given that one can create Random objects, this doesn't seem so
> unreasonable, except that the interface is wrong.  I'd think that
> Random should have a constructor that takes a  seed parameter, and
> make Seed a read-only property.

Unfortunately, there are occasionally situations where it is useful  
to be able to reset the random number generator to an arbitrary point  
in the sequence.  For example, I'm writing some code for a turn-based  
game, where turns may run weeks apart.  It would be very handy to be  
able to store the seed number at game creation and at the end of each  
turn, so that I could re-run turns with random but deterministic  
results (ie: rerun with same parameters, get same results).


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to