seed random number
This commit is contained in:
parent
e3e5d4d434
commit
9b6699b543
@ -13,6 +13,8 @@
|
|||||||
// 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, char words[][MAX_WORD_LEN], unsigned int wordCount)
|
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;
|
int row, col, placedWords = 0;
|
||||||
|
|
||||||
// Gesamtes Feld auf 0 setzen
|
// Gesamtes Feld auf 0 setzen
|
||||||
|
|||||||
@ -13,6 +13,8 @@
|
|||||||
// 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, char words[][MAX_WORD_LEN], unsigned int wordCount)
|
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;
|
int row, col, placedWords = 0;
|
||||||
|
|
||||||
// Gesamtes Feld auf 0 setzen
|
// Gesamtes Feld auf 0 setzen
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user