all the functions of game.c are done
This commit is contained in:
parent
f19b225930
commit
9839e9826b
@ -28,6 +28,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
-> Scleife die der gesamte Array durchgeht. Wenn eine Stelle leer ist, dann Zufallsbuchstabe generieren und Block füllen
|
||||
|
||||
*/
|
||||
|
||||
if (searchFieldLen == 0 || wordCount ==0)
|
||||
return 0;
|
||||
|
||||
@ -39,7 +40,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
}
|
||||
}
|
||||
|
||||
srand((unsigned int)time(NULL)); // Zufallsgenerator mit Zeit initialisieren
|
||||
srand((unsigned int)time(NULL)); // Zufallsgenerator initialisieren
|
||||
|
||||
int placedWords = 0; // Zähler für erfolgreich platzierte Wörter
|
||||
|
||||
@ -118,12 +119,11 @@ void showWordSalad(const char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN],
|
||||
-> Doppelschleife. Erste print die erste 100 Zeichen von salad[0][0bis99] hintereinander ohne Leerzeichen und dann kommt ein \n
|
||||
-> Dann wieter bis salad[99]
|
||||
*/
|
||||
/*
|
||||
for (unsigned int i = 0; i < searchFieldLen; i++) { // Läuft über jede Zeile des Spielfelds
|
||||
for (unsigned int j = 0; j < searchFieldLen; j++) { // Läuft über jede Spalte in dieser Zeile
|
||||
printf("%c ", salad[i][j]); // Gibt den Buchstaben in der Zelle aus
|
||||
}
|
||||
printf("\n"); // Beginnt eine neue Zeile nach jeder Reihe
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
BIN
Start_Windows/game.o
Normal file
BIN
Start_Windows/game.o
Normal file
Binary file not shown.
BIN
Start_Windows/input.o
Normal file
BIN
Start_Windows/input.o
Normal file
Binary file not shown.
BIN
Start_Windows/runTests.exe
Normal file
BIN
Start_Windows/runTests.exe
Normal file
Binary file not shown.
BIN
Start_Windows/wordsalad_initial.exe
Normal file
BIN
Start_Windows/wordsalad_initial.exe
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user