diff --git a/Start_Windows/game.c b/Start_Windows/game.c index 1bc6951..2ba49c0 100644 --- a/Start_Windows/game.c +++ b/Start_Windows/game.c @@ -59,12 +59,13 @@ 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++) { - for (int versuch = 0; versuch < MAX_RAND_TRIES_PER_WORD && !platziert; versuch++) { + 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; int spalte = 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; + } } diff --git a/Start_Windows/input.o b/Start_Windows/input.o new file mode 100644 index 0000000..fa4588c Binary files /dev/null and b/Start_Windows/input.o differ