removed unused code
This commit is contained in:
parent
fcb33c53ba
commit
370d7516f5
22
sudoku.c
22
sudoku.c
@ -88,27 +88,6 @@ void printDumpSudoku() {
|
|||||||
printf("+-------+-------+-------+\n");
|
printf("+-------+-------+-------+\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void printDumpQuadrat(int q[]) {
|
|
||||||
for (int row = 0; row < 3; row++) {
|
|
||||||
if (row % 3 == 0) {
|
|
||||||
printf("+-------+\n");
|
|
||||||
}
|
|
||||||
for (int col = 0; col < 3; col++) {
|
|
||||||
if (col % 3 == 0) {
|
|
||||||
if (col != 0) {
|
|
||||||
printf(" ");
|
|
||||||
}
|
|
||||||
printf("|");
|
|
||||||
}
|
|
||||||
|
|
||||||
int f = calculateField(row, col);
|
|
||||||
printf(" %d", q[f]);
|
|
||||||
}
|
|
||||||
printf(" |\n");
|
|
||||||
}
|
|
||||||
printf("+-------+\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
// checks if this value is present anywhere in the row
|
// checks if this value is present anywhere in the row
|
||||||
bool isInRow(int row, int val) {
|
bool isInRow(int row, int val) {
|
||||||
for (int col = 0; col < 9; col++) {
|
for (int col = 0; col < 9; col++) {
|
||||||
@ -305,7 +284,6 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if only one field is left undefined -> hast to be the one special value
|
// check if only one field is left undefined -> hast to be the one special value
|
||||||
int undefinedFound = VALUE_UNDEFINED;
|
|
||||||
for (int f = 0; f < 9; f++) {
|
for (int f = 0; f < 9; f++) {
|
||||||
// keep in mind that sudoku array might have changed since evaluation
|
// keep in mind that sudoku array might have changed since evaluation
|
||||||
// -> ignore already set values
|
// -> ignore already set values
|
||||||
|
Loading…
x
Reference in New Issue
Block a user