Releases: rafaelgonzalez/dice_box
Releases · rafaelgonzalez/dice_box
v0.2.0 - Dice Cup
New features
- Added
DiceBox::Cup
commodity class to roll multiple dices at once. - Added
#maximum
and#minimum
methods to bothDiceBox::Dice
andDiceBox::Cup
.
Improvements
-
DiceBox::Dice::Side
values can now be changed (DiceBox::Dice::Side#value
becomes an accessor) -
DiceBox::Dice#rolled
now truly returns the last rolled value.
Would previously return the value of the last rolled side, which would fail if the value of the rolled side is changed in the meantime.Before:
dice = DiceBox::Dice.new(6) dice.roll # => 3 dice.rolled # => 3 dice.sides[2].value = 8 dice.rolled # => 8
After:
dice = DiceBox::Dice.new(6) dice.roll # => 3 dice.rolled # => 3 dice.sides[2].value = 8 dice.rolled # => 3
-
Renamed
DiceBox::Dice#rolled
attribute to#result
.
#rolled
is kept as an alias.
v0.1.0 - Basic dice rolling
Features
- Dice rolls with
DiceBox::Dice
- Influence roll results with
DiceBox::Dice::Side