Simulation of a loaded die.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
Guardfile
LICENSE
README
loaded_dice.gemspec

README

SYNOPSIS

  die = LoadedDie.new(1,1,2,1,1,1)
  die.roll # => one of {0,1,2,3,4,5}, with 2 being more likely.

  # And just for kicks, here's a 20 sided non loaded die: 
  die = LoadedDie.new(*([1] * 20))
  die.roll

DESCRIPTION

Roll the dice in your favor! A loaded die implementation that allows
simulation of dice with any number of faces. Applications might include games,
but also simulations, where events have discrete probabilities and are
mutually exclusive.