interface RngConstructor {
    new RngConstructornew (seed?: Seed): RngInterface;
    chancyMax(input: Chancy): number;
    chancyMin(input: Chancy): number;
    diceMax(n: string | number | DiceInterface, d?: number, plus?: number): number;
    diceMin(n: string | number | DiceInterface, d?: number, plus?: number): number;
    parseDiceString(string: string): DiceInterface;
    predictable<RngConstructor>(this: (new (seed: Seed) => RngConstructor), seed: Seed): RngConstructor;
    unserialize(rng: any): any;
}

Constructors

Methods

Result Prediction

Serialization

Utilities

Constructors

Methods

Result Prediction

  • Determines the maximum value a Chancy input can take.

    Parameters

    Returns number

    Maximum value a call to chancy with these args can take

  • Determines the minimum value a Chancy input can take.

    Parameters

    Returns number

    Minimum value a call to chancy with these args can take

  • Gives the maximum result of a call to dice with these arguments

    Parameters

    • n: string | number | DiceInterface
    • Optionald: number
    • Optionalplus: number

    Returns number

  • Gives the minimum result of a call to dice with these arguments

    Parameters

    • n: string | number | DiceInterface
    • Optionald: number
    • Optionalplus: number

    Returns number

Serialization

Utilities

  • Parses a string representation of a dice and gives the object representation {n, d, plus}

    Parameters

    • string: string

      String dice representation, e.g. '1d6'

    Returns DiceInterface

    The dice representation object