Compare commits

..

No commits in common. "ebab3a110e3ed8a41a1951bacaffce61a9e35ee7" and "8ce6c24db2da549c61c7bbf802684a8296412306" have entirely different histories.

2 changed files with 5 additions and 7 deletions

View File

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

Binary file not shown.