diff --git a/Start_Windows/game.c b/Start_Windows/game.c index e64a938..064c903 100644 --- a/Start_Windows/game.c +++ b/Start_Windows/game.c @@ -51,7 +51,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi startPositionVer = rand() % searchFieldLen; for (int j = 0; j < laenge; j++) { - if (salad[startPositionVer][startPositionHor + j] == EMPTY_CHAR) { + if (salad[startPositionVer][startPositionHor + j] == EMPTY_CHAR || + salad[startPositionVer][startPositionHor + j] == words[i][j]) { noFreigabe = 0; } else { @@ -82,7 +83,8 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi startPositionHor = rand() % searchFieldLen; for (int j = 0; j < laenge; j++) { - if (salad[startPositionVer + j][startPositionHor] == EMPTY_CHAR) { + if (salad[startPositionVer + j][startPositionHor] == EMPTY_CHAR || + salad[startPositionVer + j][startPositionHor] == words[i][j]) { noFreigabe = 0; } else {