Is your feature request related to a problem? Please describe.
It doesn't make a lot of sense that WeightedDie cannot be used in Dice, and in a larger sense why any Rollable can't be. Rollable requires implementations of what I'm pretty sure are all the rolling/probabilities methods that Die has that Dice uses. It requires looking into, and refactoring some parts of Dice, but it seems like an overdue feature.
Describe the solution you'd like:
Users should be able to use and Rollable type in Dice. This includes the initializers (probably excluding the dice notation String-based initializer), operators, and pretty much everywhere else.
Describe alternatives you've considered:
Maybe Dice should only allow WeightedDie/Rollable types that I define, but that seems overly restrictive. That's what having a protocol is for.
Is your feature request related to a problem? Please describe.
It doesn't make a lot of sense that
WeightedDiecannot be used inDice, and in a larger sense why anyRollablecan't be.Rollablerequires implementations of what I'm pretty sure are all the rolling/probabilities methods thatDiehas thatDiceuses. It requires looking into, and refactoring some parts ofDice, but it seems like an overdue feature.Describe the solution you'd like:
Users should be able to use and
Rollabletype inDice. This includes the initializers (probably excluding the dice notation String-based initializer), operators, and pretty much everywhere else.Describe alternatives you've considered:
Maybe
Diceshould only allowWeightedDie/Rollabletypes that I define, but that seems overly restrictive. That's what having a protocol is for.