Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 728 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 728 Bytes

GoldDice

the gold standard for provably fair dice

NPM Version Build Status

Install

npm install --save gold-dice

Examples

var GoldDice = require('gold-dice'),
    dice = new GoldDice();

//two sides, one roll
console.log(dice.roll(2));

//six sides, ten rolls
console.log(dice.roll(6, 10));

//the state of the dice, save this in a database or wherever
console.log(dice.toString());