public class SudokuChecker { private int[][] sudoku; public SudokuChecker(int[][] grid) { this.sudoku = grid; } public boolean isValid() { boolean valid = false; if (this.sudoku == null) { } else { if(this.sudoku.length != this.sudoku[0].length) { } else if (this.checkSub() && this.checkCol() && this.checkRow()) { valid = true; } else { } } return valid; } private boolean checkSub() { boolean subsquare = true; return subsquare; } private boolean checkRow() { boolean row = false; int check1 = 0; int check2 = 0; for( int i = 0; i < this.sudoku.length - 1; i++) { for( int j = 0; j < this.sudoku[i].length - 2; j++) { check1 = this.sudoku[i][j]; for( int k = j + 1; k < this.sudoku[i].length - 1; k++) { check2 = this.sudoku[i][k]; if (check1 == check2) { break; } else { row = true; } } } } return row; } private boolean checkCol() { boolean col = true; return col; } }