Mostly derived from AllegroFlare's Random class, two new RandomGenerator and DiceRoller classes are included here with better testing.
Concern Over Hard-Coded Testing Values
Note that there is still some trepidation about the testing technique used in DiceRoller to determine the expected probabilities, which, for now, is hard coded. There has been some discussion the allegro.cc forum suggesting alternative approaches, including combining a probability mass function (PMF) with convolution.
Improving this testing to use these approaches would be 👍.
Add Some Randomz
Mostly derived from AllegroFlare's
Random
class, two newRandomGenerator
andDiceRoller
classes are included here with better testing.Concern Over Hard-Coded Testing Values
Note that there is still some trepidation about the testing technique used in
DiceRoller
to determine the expected probabilities, which, for now, is hard coded. There has been some discussion the allegro.cc forum suggesting alternative approaches, including combining a probability mass function (PMF) with convolution. Improving this testing to use these approaches would be 👍.