private bool CheckCols() { for (int col = 0; col < BoardSize; ++col) { var setValidator = new SetValidator(Col(col)); if (!setValidator.IsUnique) { return(false); } } return(true); }
private bool CheckRows() { for (int row = 0; row < BoardSize; ++row) { var setValidator = new SetValidator(Row(row)); if (!setValidator.IsUnique) { return(false); } } return(true); }
private bool CheckSquares() { const int squareSize = 3; for (int row = 0; row < squareSize; ++row) { for (int col = 0; col < squareSize; ++col) { var setValidator = new SetValidator(SubSquare(row, col)); if (!setValidator.IsUnique) { return(false); } } } return(true); }