diff --git a/I2_Wortsalat/Start_Linux/game.c b/I2_Wortsalat/Start_Linux/game.c index 6b56af7..d724872 100644 --- a/I2_Wortsalat/Start_Linux/game.c +++ b/I2_Wortsalat/Start_Linux/game.c @@ -116,11 +116,5 @@ 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 4d257ce..d724872 100644 --- a/I2_Wortsalat/Start_Mac/game.c +++ b/I2_Wortsalat/Start_Mac/game.c @@ -30,6 +30,7 @@ void fillRestWithRandom(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], // - wordCount -> anzahl an Wörtern int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount) { + srand(time(NULL)); int placedWords = 0; //Feld komplettmit EMPTY_CHAR füllen diff --git a/I2_Wortsalat/Start_Windows/game.c b/I2_Wortsalat/Start_Windows/game.c index 6b56af7..d724872 100644 --- a/I2_Wortsalat/Start_Windows/game.c +++ b/I2_Wortsalat/Start_Windows/game.c @@ -116,11 +116,5 @@ 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]); - } - } + }