init random number generator

This commit is contained in:
Simon Wiesend 2025-10-31 08:18:19 +01:00
parent dc9b59395b
commit 1098b0f8c0
No known key found for this signature in database
GPG Key ID: 711FA2FAE3A80C81

View File

@ -13,6 +13,9 @@
// 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, const char words[][MAX_WORD_LEN], unsigned int wordCount)
{
// set seed for random number generator
srand(time(NULL));
int r, c;
//Gesamtes Feld auf 0 setzen