sudoku: constraints: solved: check for filled nums

This commit is contained in:
Bruno BELANYI 2020-12-23 15:44:42 +01:00
parent 547972417b
commit 7fb10cdb0b

View file

@ -55,6 +55,8 @@ bool solved(const struct sudoku *grid) {
for (size_t i = 0; i < 9; ++i) { for (size_t i = 0; i < 9; ++i) {
for (size_t j = 0; j < 9; ++j) { for (size_t j = 0; j < 9; ++j) {
if (!grid->grid[i][j])
return false;
if (line_violation(grid, i, j)) if (line_violation(grid, i, j))
return false; return false;
if (column_violation(grid, i, j)) if (column_violation(grid, i, j))