init random number generator
This commit is contained in:
parent
dc9b59395b
commit
1098b0f8c0
@ -13,6 +13,9 @@
|
|||||||
// Creates the word salad by placing words randomly and filling empty spaces
|
// 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)
|
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;
|
int r, c;
|
||||||
|
|
||||||
//Gesamtes Feld auf 0 setzen
|
//Gesamtes Feld auf 0 setzen
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user