Minor final check performance increase

This commit is contained in:
Trianta 2023-11-03 01:01:28 -05:00
parent 6255b786a1
commit dd3c92f6f7

View File

@ -30,8 +30,8 @@ void Sudoku::Solve(void) {
bool Sudoku::IsBoardSolved(void) { bool Sudoku::IsBoardSolved(void) {
int row, column; int row, column;
for (row = 0; row < 9; ++row) { for (row = 0; row < 9; row += 3) {
for (column = 0; column < 9; ++column) { for (column = 0; column < 9; column += 3) {
if (!GetUnusedRow(row).empty()) { return false; } if (!GetUnusedRow(row).empty()) { return false; }
if (!GetUnusedColumn(column).empty()) { return false; } if (!GetUnusedColumn(column).empty()) { return false; }
if (!GetUnusedSubgrid(row, column).empty()) { return false; } if (!GetUnusedSubgrid(row, column).empty()) { return false; }