Exemple #1
0
    private static BigInteger[][] GenerateGameFieldMatrix(int heigth, int width)
    {
        var matrix = new BigInteger[heigth][];
        for (int i = 0; i < heigth; i++)
        {
            matrix[i] = new BigInteger[width];
            for (int j = 0; j < width; j++)
            {
                matrix[i][j] = (BigInteger)1 << (i + j);
            }
        }

        matrix = matrix.OrderByDescending(m => m[0])
            .ToArray();
        return matrix;
    }