checks if a sudoku is solved