namespace MinMaxAB; public static class Extensions { public static T ChooseRandom(this T[] source) => source[Random.Shared.Next(0, source.Length)]; public static T[,] Fill(int cols, int rows, T value) { T[,] array = new T[cols, rows]; for (int i = 0; i < array.GetLength(0); i++) { for (int j = 0; j < array.GetLength(1); j++) { array[i, j] = value; } } return array; } }