Skip to content

Releases: nuffleapp/nuffle-php

v1.0.3

24 May 03:18
Compare
Choose a tag to compare

Nuffle is a calculator, and as such, the number 0 is now acceptable input.

v1.0.2

24 May 03:18
Compare
Choose a tag to compare

Remove an unthrown exception.

v1.0.1

24 May 03:17
Compare
Choose a tag to compare

Remove anonymous function in favor of class method to maintain php 5.3 compatibility

v1.0.0

24 May 03:17
Compare
Choose a tag to compare

The v1.0.0 release of Nuffle brings with it a brand new set of functionality. Rather than just a simple dice roller, Nuffle is now a dice calculator.

To use Nuffle, simply call the roll() method with your equation:

Nuffle::roll('5d6 + 1d20 / (1d6 - 2)')

That method will return an object that looks like the following:

{
   "rolls" : [
      {
         "notation" : "5d6",
         "rolls" : [
            2,
            1,
            2,
            4,
            5
         ]
      },
      {
         "notation" : "1d20",
         "rolls" : [
            11
         ]
      },
      {
         "rolls" : [
            4
         ],
         "notation" : "1d6"
      }
   ],
   "equation" : "(2 + 1 + 2 + 4 + 5) + (11) / ((4) - 2)",
   "result" : 19.5,
   "input" : "5d6 + 1d20 / (1d6 - 2)"
}

The object includes the value of each individual dice roll notation, the expanded equation, the equation result, and the original input.

v0.1.1

13 May 04:59
Compare
Choose a tag to compare
  • Travis-CI Fixes
  • Codecov Fixes

v0.1.0

12 May 23:05
Compare
Choose a tag to compare

Initial release.