Compare commits

...

2 Commits

2 changed files with 7 additions and 5 deletions

View File

@ -59,11 +59,12 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
unsigned int erfolgreichGesetzt = 0;
//Wörter zufällig platzieren
for(unisgned int w = 0; w < wordCount; w++) {
int platziert = 0;
//for(unsigned int w = 0, w < wordCount, w++) {
for (unsigned int w = 0; w < wordCount; w++)
for (unsigned int w = 0, w < wordCount, w++)
{
int platziert = 0;
for (int versuch = 0; versuch < MAX_RAND_TRIES_PER_WORD && !platziert; versuch++) {
int richtung = rand() % 2; // 0 = horizontal, 1 = vertikal
int zeile = rand() % searchFieldLen;
@ -83,10 +84,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
if (salad[i][j] == EMPTY_CHAR)
salad[i][j] = 'A' + rand() % 26;
}
}
// }
return erfolgreichGesetzt;
}
}

BIN
Start_Windows/input.o Normal file

Binary file not shown.