Пример #1
0
        public int[] SetColSubArray(int colNumber)
        {
            int globalSize = board.GetMaxValue();

            colSubArray = new int[globalSize];
            int max = globalSize - 1;

            for (int i = 0; i <= max; i++)
            {
                colSubArray[i] = sudoku.GetByColumn(colNumber, i);
            }
            return(colSubArray);
        }
Пример #2
0
        public void DisplaySudokuBoard()
        {
            view.Start();
            board.SetMaxValue(6);
            board.SetDifficulty(1);
            board.FromCSV(@"C:\board2.csv");
            board.Set(board.ToArray());
            view.Show(board.ToPrettyString());
            view.Show(sudoku.GetByColumn(1, 1));
            view.Show(row.IsRowCellValid(0));
            view.Show(row.IsRowComplete(0));
            view.Show(column.IsColumnComplete(0));
            view.Show(square.GetCellSquare(0));
            square.SetSubSquareIndex(0);
            view.Show(board.ToStringArray(square.GetSquareSubIndex()));
            view.Show("----------------------------------------------");
            //view.Show(square.IsSquareComplete(5));
            square.SetSquareSubArray(5);
            view.Show(board.ToStringArray(square.GetSquareSubArray()));
            view.Show(square.IsSquareComplete(5));

            view.Stop();
        }