arbeite später dran, jetzt nächste praktikum aufgabe

This commit is contained in:
Tobias Kachel 2025-11-04 10:45:17 +01:00
parent ebb886ae9e
commit 17a74ddc81
3 changed files with 3 additions and 2 deletions

View File

@ -54,7 +54,7 @@ int placeWord(char intoArray[][], char insertedWord[][])
int xCord = rand() % MAX_SEARCH_FIELD_LEN;
int yCord = rand() % MAX_SEARCH_FIELD_LEN;
int isHorizontal = rand() % 2;
unsigned int wordLength = strlen(insertedWord[numberWord][0]);
if(isHorizontal)
{
if(xCord + sizeof(insertedWord[numberWord][0]) <= MAX_SEARCH_FIELD_LEN)

View File

@ -15,7 +15,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN],unsigned int maxWordCount)
}
char teiler[] = " ;,.\n";
char *aktuellesWort;
char aktuellesWort;
int wortAnzahl = 0;
while (fgets(puffer, MAX_WORD_LEN, file) != NULL)

View File

@ -41,6 +41,7 @@ int main(int argc, char *argv[])
if(placedWords == wordCount)
{
// Start the game if successful
startGame(wordSalad,MAX_NUMBER_OF_WORDS,placedWords, wordCount,1024);
}
else
{