Seed erzeugen korigieren
This commit is contained in:
parent
5ba22a1fa8
commit
cf09c5233a
@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
if (y + wordLength > searchFieldLen) continue;
|
||||
|
||||
//Prüfen ob kein anderes Wort im Weg
|
||||
int fits = 1;
|
||||
int fits = 1;
|
||||
for (int i = 0; i < wordLength; i++)
|
||||
{
|
||||
if (salad[y + i][x] != EMPTY_CHAR)
|
||||
@ -116,5 +116,11 @@ 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
if (y + wordLength > searchFieldLen) continue;
|
||||
|
||||
//Prüfen ob kein anderes Wort im Weg
|
||||
int fits = 1;
|
||||
int fits = 1;
|
||||
for (int i = 0; i < wordLength; i++)
|
||||
{
|
||||
if (salad[y + i][x] != EMPTY_CHAR)
|
||||
@ -116,5 +116,11 @@ 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
if (y + wordLength > searchFieldLen) continue;
|
||||
|
||||
//Prüfen ob kein anderes Wort im Weg
|
||||
int fits = 1;
|
||||
int fits = 1;
|
||||
for (int i = 0; i < wordLength; i++)
|
||||
{
|
||||
if (salad[y + i][x] != EMPTY_CHAR)
|
||||
@ -116,5 +116,11 @@ 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user