forked from schroederen/info2Praktikum-Wortsalat
showWordsalad Funktion in Start_Windows
This commit is contained in:
parent
95592836b6
commit
6f176e51aa
@ -42,9 +42,7 @@ int main(int argc, char *argv[])
|
|||||||
if(placedWords == wordCount)
|
if(placedWords == wordCount)
|
||||||
{
|
{
|
||||||
// Start the game if successful
|
// Start the game if successful
|
||||||
printf("All %u words were successfully placed in the word salad!\n", wordCount);
|
startGame(wordSalad,SALAD_SIZE,words,wordCount,SALAD_SIZE);
|
||||||
createWordSalad(wordSalad, SALAD_SIZE, words, wordCount);
|
|
||||||
showWordSalad(wordSalad, SALAD_SIZE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,5 +19,12 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
|||||||
// Prints the word salad to console
|
// Prints the word salad to console
|
||||||
void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen)
|
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]);
|
||||||
|
printf(" ");
|
||||||
|
}
|
||||||
|
printf ("\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user