namespace Masuit.Tools.RandomSelector; public class WeightedItem(T value, int weight) { /// /// 权重 /// public int Weight = weight; /// /// 元素 /// public readonly T Value = value; /// /// 累计权重 /// internal int CumulativeWeight = 0; }