// IEnumerable<T> public static List <T> Jumble <T>(this IEnumerable <T> collection, NoiseRand rand) { var result = collection.ToList(); // Grab random elements from the collection and move them to the end for (int i = result.Count; i > 0; i--) { int index = rand.Next(i); result.Add(result[index]); result.RemoveAt(index); } return(result); }
public int get_rng(int max) { return(Rand.Next(max)); }