PokéRogue
    Preparing search index...

    Function weightedPick

    • Function for picking an item out of a mapping based on the given weights

      Type Parameters

      • T

      Parameters

      • items: Map<T, number>

        The mapping of item to weight

      Returns T

      a randomly picked item according to the weights