Static utilities to use to generate game codes and convert between formats.

Hierarchy

  • GameCode

Methods

  • Parameters

    • a: number
    • b: number
    • c: number
    • d: number
    • e: number
    • f: number

    Returns number

  • Convert a game code from an integer representation to use as a string.

    Returns

    A string representation of the game code.

    Parameters

    • bytes: number

    Returns string

  • Convert a game code from a string representation to use as an integer.

    Returns

    An integer representation of the game code.

    Parameters

    • code: string

      A game code as a string.

    Returns number

  • Convert a version 1 game code from an integer representation to use as a string.

    Returns

    A string representation of the game code.

    Parameters

    • bytes: number

    Returns string

  • Convert a version 1 game code from a string representation to use as an integer.

    Returns

    An integer representation of the game code.

    Parameters

    • code: string

      A version 1 game code as a string, i.e. a 4 letter code.

    Returns number

  • Convert a version 2 game code from an integer representation to use as a string.

    Returns

    A string representation of the game code.

    Parameters

    • bytes: number

    Returns string

  • Convert a version 2 game code from a string representation to use as an integer.

    Returns

    An integer representation of the game code.

    Parameters

    • code: string

      A version 2 game code as a string, i.e. a 6 letter code.

    Returns number

  • Generate a random version 1 game code.

    Returns

    An integer representation of the generated game code

    Returns number

  • Generate a random version 2 game code.

    Returns

    An integer representation of the generated game code

    Returns number

Generated using TypeDoc