Funktioniert

This commit is contained in:
herdingto103621 committed 2026-10-29 14:56:44 +01:00
1 parent 6c72054f42
commit b0951bcb45
3 files changed
+34 -10

No files matched your search

+2 -2
View File
@@ -50,8 +50,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
for(int j = 0; j < strlen(words[i]); j++){
salad[startpoint_x + j][startpoint_y] = words[i][j];
}
break;
wordsplaced += 1;
break;
case 1: //X-Negativ
startpoint_x = strlen(words[i]) - 1 + rand() % (searchFieldLen - strlen(words[i]) + 1);
startpoint_y = rand() % searchFieldLen;
@@ -70,8 +70,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
for(int j = 0; j < strlen(words[i]); j++){
salad[startpoint_x - j][startpoint_y] = words[i][j];
}
break;
wordsplaced += 1;
break;
case 2: //Y-Positiv
startpoint_x = rand() % searchFieldLen;
startpoint_y = rand() % (searchFieldLen - strlen(words[i]) + 1);