forked from freudenreichan/info2Praktikum-Wortsalat
Implemented Empty Space filling
This commit is contained in:
1 parent
3db13ace33
commit
4f43ad6429
1 file changed
+10
-5
+10
-5
@@ -95,10 +95,15 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Fill empty spaces
|
//Fill empty spaces
|
||||||
|
for (int r = 0; r < searchFieldLen; r++)
|
||||||
|
{
|
||||||
|
for (int c = 0; c < searchFieldLen; c++)
|
||||||
|
{
|
||||||
|
if (salad[r][c] == EMPTY_CHAR)
|
||||||
|
{
|
||||||
|
salad[r][c] = 'A' + rand() % 26;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return placedWOrds;
|
return placedWOrds;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user