diff --git a/I2_Wortsalat/Start_Linux/game.c b/I2_Wortsalat/Start_Linux/game.c index d724872..a8905e1 100644 --- a/I2_Wortsalat/Start_Linux/game.c +++ b/I2_Wortsalat/Start_Linux/game.c @@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi if (y + wordLength > searchFieldLen) continue; //Prüfen ob kein anderes Wort im Weg - int fits = 1; + int fits = 1; for (int i = 0; i < wordLength; i++) { if (salad[y + i][x] != EMPTY_CHAR) @@ -116,5 +116,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi // Prints the word salad to console void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen) { - + for( int i = 0; i < searchFieldLen; i++ ) + { + for( int j = 0; j < searchFieldLen; j++ ) + { + printf("%c", salad[i][j]); + } + } } diff --git a/I2_Wortsalat/Start_Mac/game.c b/I2_Wortsalat/Start_Mac/game.c index d724872..a8905e1 100644 --- a/I2_Wortsalat/Start_Mac/game.c +++ b/I2_Wortsalat/Start_Mac/game.c @@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi if (y + wordLength > searchFieldLen) continue; //Prüfen ob kein anderes Wort im Weg - int fits = 1; + int fits = 1; for (int i = 0; i < wordLength; i++) { if (salad[y + i][x] != EMPTY_CHAR) @@ -116,5 +116,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi // Prints the word salad to console void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen) { - + for( int i = 0; i < searchFieldLen; i++ ) + { + for( int j = 0; j < searchFieldLen; j++ ) + { + printf("%c", salad[i][j]); + } + } } diff --git a/I2_Wortsalat/Start_Windows/game.c b/I2_Wortsalat/Start_Windows/game.c index d724872..a8905e1 100644 --- a/I2_Wortsalat/Start_Windows/game.c +++ b/I2_Wortsalat/Start_Windows/game.c @@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi if (y + wordLength > searchFieldLen) continue; //Prüfen ob kein anderes Wort im Weg - int fits = 1; + int fits = 1; for (int i = 0; i < wordLength; i++) { if (salad[y + i][x] != EMPTY_CHAR) @@ -116,5 +116,11 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi // Prints the word salad to console void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen) { - + for( int i = 0; i < searchFieldLen; i++ ) + { + for( int j = 0; j < searchFieldLen; j++ ) + { + printf("%c", salad[i][j]); + } + } }