private bool checkConsistencyRow() { for (int rowIndex = 0; rowIndex < GameMatrix.Count; ++rowIndex) { List <SudokuCell> row = SudokuUtility.getMatrixSubSpace(this, new MatrixCoords { TopologyType = SpaceType.ROW, ROW = rowIndex }); if (!checkConsistencyGenericSpace(row)) { return(false); } } return(true); }
private bool checkConsistencyColumn() { for (int colIndex = 0; colIndex < GameMatrix.Count; ++colIndex) { List <SudokuCell> column = SudokuUtility.getMatrixSubSpace(this, new MatrixCoords { TopologyType = SpaceType.COLUMN, COLUMN = colIndex }); if (!checkConsistencyGenericSpace(column)) { return(false); } } return(true); }
private bool checkConsistencyBox() { for (int boxRowIndex = 0; boxRowIndex < SudokuUtility.DEFAULT_OUTERBOX_SIZE; ++boxRowIndex) { for (int boxColIndex = 0; boxColIndex < SudokuUtility.DEFAULT_OUTERBOX_SIZE; ++boxColIndex) { List <SudokuCell> box = SudokuUtility.getMatrixSubSpace(this, new MatrixCoords { TopologyType = SpaceType.BOX, ROW = boxRowIndex * 3, COLUMN = boxColIndex * 3 }); if (!checkConsistencyGenericSpace(box)) { return(false); } } } return(true); }