A collection of utility functions when interacting with a PositionBundle.

Constructors

Methods

  • Check if the bundle index is in the correct range.

    Parameters

    • bundleIndex: number

      The bundle index to be checked

    Returns boolean

    true if bundle index is in the correct range

  • Convert position bitmap to the array of boolean which represent if Bundled Position is open.

    Parameters

    Returns boolean[]

    The array of boolean representing if Bundled Position is open

  • Get the first unoccupied bundle index in the position bundle.

    Parameters

    Returns null | number

    The first unoccupied bundle index, null if the position bundle is full

  • Get all bundle indexes where the corresponding Bundled Position is open.

    Parameters

    Returns number[]

    The array of bundle index where the corresponding Bundled Position is open

  • Get all bundle indexes where the corresponding Bundled Position is not open.

    Parameters

    Returns number[]

    The array of bundle index where the corresponding Bundled Position is not open

  • Check if the Bundled Position corresponding to the bundle index has been opened.

    Parameters

    • positionBundle: PositionBundleData

      The position bundle to be checked

    • bundleIndex: number

      The bundle index to be checked

    Returns boolean

    true if Bundled Position has been opened

  • Check if the Bundled Position corresponding to the bundle index has not been opened.

    Parameters

    • positionBundle: PositionBundleData

      The position bundle to be checked

    • bundleIndex: number

      The bundle index to be checked

    Returns boolean

    true if Bundled Position has not been opened