Skip to content

Releases: rafaelgonzalez/dice_box

v0.2.0 - Dice Cup

10 Aug 18:21
Compare
Choose a tag to compare

New features

  • Added DiceBox::Cup commodity class to roll multiple dices at once.
  • Added #maximum and #minimum methods to both DiceBox::Dice and DiceBox::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

01 Aug 16:04
Compare
Choose a tag to compare

Features

  • Dice rolls with DiceBox::Dice
  • Influence roll results with DiceBox::Dice::Side