public static bool IsCollision(SudokuField sudokuField) { for (var i = 1; i <= Data.MaxValue; i++) { if (IsDuplicate(sudokuField.GetRow(i))) { return(true); } if (IsDuplicate(sudokuField.GetColumn(i))) { return(true); } if (IsDuplicate(sudokuField.GetSection(i))) { return(true); } } return(false); }
public static bool IsFilled(SudokuField sudokuField) => sudokuField.Field .Select(n => n.Value.Number) .Where(n => n == Data.Empty) .Count() == 0;