internal SingleSelector(WeightedSelector <T> weightedSelector) : base(weightedSelector) { }
internal SelectorBase(WeightedSelector <T> weightedSelector) { WeightedSelector = weightedSelector; }
public static int TotalWeight <T>(this WeightedSelector <T> selector) { return(selector.Items.Count == 0 ? 0 : selector.Items.Sum(t => t.Weight)); }
internal MultipleSelector(WeightedSelector <T> weightedSelector) : base(weightedSelector) { }
public static List <WeightedItem <T> > OrderByWeightAscending <T>(this WeightedSelector <T> selector) { return(selector.Items.OrderBy(item => item.Weight).ToList()); }