private bool CheckRows(char[][] board) { for (int i = 0; i < 9; i++) { var sudokuChecker = new SudokuChecker(); for (int j = 0; j < 9; j++) { if (!sudokuChecker.AddChar(board[i][j])) { return(false); } } } return(true); }
private bool CheckSquares(char[][] board) { for (int startIPoint = 0; startIPoint < 9; startIPoint += 3) { for (int startJPoint = 0; startJPoint < 9; startJPoint += 3) { var sudokuChecker = new SudokuChecker(); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (!sudokuChecker.AddChar(board[startIPoint + i][startJPoint + j])) { return(false); } } } } } return(true); }