2.0.4 • Published 5 years ago

xdicey v2.0.4

Weekly downloads
16
License
GPL-3.0
Repository
github
Last release
5 years ago

xdicey

NPM

Travis npm npm node license

Throw an x sided dice y amount of times.

Example

dice = require("xdicey") //Require the package under the name dice

let SIDES = 6 // Were using six sided dies
let ROLLS = 1 // And rolling once

throwDice = dice(ROLLS,SIDES) // Throws a six sided die one time

console.log("Threw a " + ROLLS + "d" + " SIDES" + "and received" + throwDice.total);

Usage

dice = require("xdicey");

variable = dice(x,y);

x is the amount of times the die should be thrown. y is the amount of sides the die has.

The module will return a collection. The keys in the collection are total, which is the sum of all dice thrown and individual which is an array containing the individual results.

2.0.4

5 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago