Sum of roll of N dice
|
05-02-2018, 08:04 AM
Post: #6
|
|||
|
|||
RE: Sum of roll of N dice
(05-02-2018 07:01 AM)Jim Horn Wrote: So, just find a random number from 0 to (6^N)-1, convert to base 6, add the sum of its digits plus N (to correct the "subtract 1 from each digit") and there you go: the sum of the six rolled dice with only one random number generation. That is the optimization I meant. Quite short and effective. How much I need to learn! Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)