Closed angelocordon closed 5 years ago
@tyberious-1 - I want to propose some changes in how the Dice
model could/should work based off of your PR (#15). The main change here is the way we may be able to use a Dice model to call Dice.roll
in any situations.
By default, it will roll a one six-sided dice (we can change this to whatever we think makes sense), but if we ever need a D20 dice for example, we'd just use the method as follows:
Dice.roll(number_of_sides: 20)
Which will return us a value from a simulated one twenty-sided dice roll.
Thoughts?
A d6 is not really rolled that often a default d20 would be better
Also, would a modifier be applied to each roll individually, or to the total sum? If the former, that could be a use-case for #simulate_roll
, and tie in a min
/max
type thing.
Also, would a modifier be applied to each roll individually, or to the total sum? If the former, that could be a use-case for
#simulate_roll
, and tie in amin
/max
type thing.
The modifiers are applied to the total not to individual rolls.
Refactor Dice model. Add RSpec testing framework. Update Docker and Gemfile to use Ruby 2.5.0.