Example #1
0
        /// <summary>
        /// Creates a new pool.
        /// </summary>
        public RandomPool(int size)
        {
            _pool   = new int[size];
            _random = RandomGeneratorExtensions.GetRandom();

            this.Reset();
        }
Example #2
0
 /// <summary>
 /// Shuffles the list using Fisher-Yates shuffle.
 /// </summary>
 public static void Shuffle <T>(this IList <T> list)
 {
     list.Shuffle(RandomGeneratorExtensions.GetRandom());
 }