seed random number

This commit is contained in:
Simon Wiesend 2025-11-07 08:02:30 +01:00
parent e3e5d4d434
commit 9b6699b543
No known key found for this signature in database
GPG Key ID: 711FA2FAE3A80C81
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,8 @@
// Creates the word salad by placing words randomly and filling empty spaces
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, char words[][MAX_WORD_LEN], unsigned int wordCount)
{
srand(time(NULL));
int row, col, placedWords = 0;
// Gesamtes Feld auf 0 setzen

View File

@ -13,6 +13,8 @@
// Creates the word salad by placing words randomly and filling empty spaces
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, char words[][MAX_WORD_LEN], unsigned int wordCount)
{
srand(time(NULL));
int row, col, placedWords = 0;
// Gesamtes Feld auf 0 setzen