Beispiel #1
0
        /// <summary>
        /// Creates a default 9x9 sudoku completely unsolved puzzle grid
        ///     with each cell populated by the default alphabet.
        /// </summary>
        public Grid()
        {
            Alphabet    = "123456789";
            GridArr     = new Cell[9, 9];
            SubgridRows = 3;
            SubgridCols = 3;

            //create all default cells
            for (int x = 0; x < GridArr.GetLength(0); x++)
            {
                for (int y = 0; y < GridArr.GetLength(1); y++)
                {
                    GridArr[x, y] = new Cell(x, y, Alphabet);
                }
            }
        }