1.0.5 • Published 6 months ago

dicegameutils v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Dicegameutils

Small utility library for dice games

Functions

yahtzee_score

Provide an array of 5 integers between 1 and 6, and it will calculate the best score and what type of result it is.

example

import { yahtzee_score } from 'dicegameutils'
const { score, type } = yahtzee_score([3, 5, 3, 5, 5])

console.log(score)  // output: 21
console.log(type)   // output: 'full house'
1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

1 year ago