implemented return value

This commit is contained in:
sengpielto106561 committed 2026-10-25 15:44:45 +01:00
1 parent d61687f8df
commit a02b363e20
3 files changed
+33 -2

No files matched your search

+3 -1
View File
@@ -69,6 +69,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
for (int i = 0; i < (int)len; i++){
salad[x][y+i] = currentWord[i];
}
placedWords++;
break;
}
@@ -83,7 +84,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
break;
}
}
//if not all spaces are empty try again
if(cont) continue;
@@ -91,6 +92,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
for (int i = 0; i < (int)len; i++){
salad[x+1][y] = currentWord[i];
}
placedWords++;
}
}
return placedWords;