Popularity
2.2
Stable
Activity
0.0
Stable
13
1
1

Monthly Downloads: 2
Programming language: Elixir
License: MIT License

dice alternatives and similar packages

Based on the "Examples and funny stuff" category.
Alternatively, view dice alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of dice or a related project?

Add another 'Examples and funny stuff' Package

README

Dice

Test the results of rolling different sided dice.

Add as Dependency

{:dice, "~> 0.0.1"}

Build CLI App

mix escript.build

Run CLI App

./dice $num_trials $num_sides_die_1 $num_sides_die_2 $num_sides_die_3 ...

Use Library

# Create 2 x 6-sided die
dice = Dice.new([6, 6])

# Roll the dice
result = Dice.roll(dice)
# => 7

# Run several trials of the dice
results = Dice.trials(dice, 1000)
# => %{2 => 19, 3 => 52, 4 => 53, 5 => 81, 6 => 89, 7 => 167, 8 => 158, 9 => 118, 10 => 118, 11 => 86, 12 => 59}