# game.dice

> this is a package to generate D&D dice

Latest version **0.1.0** (published 2017-10-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install game.dice
pnpm add game.dice
yarn add game.dice
bun add game.dice
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-10-25 |
| First published | 2017-10-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sa1 |
| Maintainers | yumer |
| Keywords | game, D&D, dice |

## Links

- npm: https://www.npmjs.com/package/game.dice
- Repository: https://github.com/5alamander/d6.5
- Homepage: https://github.com/5alamander/d6.5#readme
- Issues: https://github.com/5alamander/d6.5/issues
- npm.io page: https://npm.io/package/game.dice

## Dependencies (1)

- [@types/mocha](https://npm.io/package/@types/mocha.md) ^2.2.43

## Recent versions

- 0.1.0 (latest) — 2017-10-25

## README

# d6.5
this is a package to generate D&amp;D dice

## Interface
``` ts
export interface IDice {
    times: number;
    face: number;
    modifier: number;
    isFloat: boolean;
}
export declare class DiceWrapper {
    private dice;
    private random;
    constructor(dice?: IDice);
    of(times: number, face: number, modifier?: number, isFloat?: boolean): this;
    setModifier(modifier: number): this;
    setRandom(random: () => number): this;
    roll(random?: () => number): number;
}
/**
 * use a input to generate a dice,
 * format: 'dm' 'ndm' 'ndm [+-]k'
 * @param {string} input string that generate the dice
 */
export declare function dice(input?: string, isFloat?: boolean): DiceWrapper;
export declare function rollDice(input: string, isFloat?: boolean): number;
export declare function parse(input: string, isFloat: boolean): IDice;

```

---
_Source: https://npm.io/package/game.dice · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
