in reply to Re: Re: check my logic & a random number issue
in thread check my logic & a random number issue
My modifications to the code changed the way it worked and therefore the responses I got. My roll function allowed "1" to be returned, which ought to be impossible (with two dice). A mistake I made when making my version strict compliant prevented this mistake from showing up in my version, so I assumed it was a bug in the original code (using my roll function though).
In which case I can't see any logic errors in the code (except perhaps for not validating the roll dice value and catching errors that shouldn't happen in that extra else statement).
What I said about doing proper statistical analyses is still valid. ;)
Oh, and don't take the fact that I made mistakes in a quick and dirty strict compliancy conversion to be an argument for not using strict. ;) This (as well as formatting) was sorely missed in the original version of this code.
jarich
|
|---|