Skip to content

Generates all combinations of dice given number of dice and sides.

License

Notifications You must be signed in to change notification settings

jdew89/dice-combination-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Dice Combination Generator

Generates all combinations of dice given the number of sides and number of dice using recursion.

Edit the const values of dice_sides and num_dice to your desired values:

const dice_sides = 6;
const num_dice = 5;

Formula to check calculations:

N = Number of Dice; S = Number of Sides;

(N + S - 1)! / (N!(S - 1)!)

In this example, the number is 252 combinations.

About

Generates all combinations of dice given number of dice and sides.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published