generated from freudenreichan/info2Praktikum-Wortsalat
funktion showWordSalad ergänzt, fehler in placeRandomLetters korrigiert
This commit is contained in:
parent
f407d5a36f
commit
2f625c98b9
@ -128,8 +128,6 @@ void placeRandomLetters(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN],
|
||||
for (i = 0; i < searchFieldLen; i++)
|
||||
{
|
||||
for (j = 0; i < searchFieldLen; j++)
|
||||
{
|
||||
if (salad[i][j])
|
||||
{
|
||||
if ((salad[i][j] < 'A') && (salad[i][j] > 'z'))
|
||||
{
|
||||
@ -137,7 +135,6 @@ void placeRandomLetters(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -179,6 +176,17 @@ 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)
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
||||
|
||||
for (i = 0; i < searchFieldLen; i++)
|
||||
{
|
||||
for (j = 0; i < searchFieldLen; j++)
|
||||
{
|
||||
printf("%c", salad[i][j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user