using Core.Annotations;
namespace Core.Helpers;
[Injectable]
public class WeightedRandomHelper
{
public WeightedRandomHelper()
{
}
///
/// Choos an item from the passed in array based on the weightings of each
///
/// Items and weights to use
/// Chosen item from array
public T GetWeightedValue(Dictionary itemArray)
{
throw new NotImplementedException();
}
///
/// Picks the random item based on its weight.
/// The items with higher weight will be picked more often (with a higher probability).
///
/// For example:
/// - items = ['banana', 'orange', 'apple']
/// - weights = [0, 0.2, 0.8]
/// - weightedRandom(items, weights) in 80% of cases will return 'apple', in 20% of cases will return
/// 'orange' and it will never return 'banana' (because probability of picking the banana is 0%)
///
///
/// List of items
/// List of weights
/// Dictionary with item and index
public Dictionary WeightedRandom(List