generated from Trianta/cpp-unity-template
Minor final check performance increase
This commit is contained in:
parent
6255b786a1
commit
dd3c92f6f7
@ -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; }
|
||||||
|
Loading…
Reference in New Issue
Block a user