using System; using System.Collections.Generic; namespace MafiaCommon { public static class ListUtils { public static void Shuffle (this Random rng, T[] array) { int n = array.Length; while (n > 1) { int k = rng.Next(n--); T temp = array[n]; array[n] = array[k]; array[k] = temp; } } public static T[] RemoveFromArray (this T[] original, int numIdx) { if (numIdx == -1) return original; List tmp = new List(original); tmp.RemoveAt(numIdx); return tmp.ToArray(); } } }