using System; using System.Collections.Generic; namespace Movementtests.tools; public static class IterableUtils { private static readonly Random Rng = new Random(); public static void Shuffle(this IList list) { var n = list.Count; while (n > 1) { n--; var k = Rng.Next(n + 1); (list[k], list[n]) = (list[n], list[k]); } } }