generated from freudenreichan/info2Praktikum-Wortsalat
Finale Version V1
Finale Version V1 Finale Version V1 Finale Version V1 Please enter the commit message for your changes. Lines starting
This commit is contained in:
parent
442a5aabed
commit
d3ba3a29e2
@ -31,7 +31,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
||||
|
||||
while (token != NULL && count < maxWordCount) {
|
||||
trim_and_toupper(words[count], token, MAX_WORD_LEN);
|
||||
if (words[count][0] !='\n'){
|
||||
if (words[count][0] !='\0'){
|
||||
count++;
|
||||
}
|
||||
token = strtok(NULL, DELIMITERS);
|
||||
|
||||
@ -25,7 +25,7 @@ int main(int argc, char *argv[]) {
|
||||
wordCount = readWords(file, words, MAX_NUMBER_OF_WORDS);
|
||||
fclose(file);
|
||||
placedWords = createWordSalad(wordSalad, SALAD_SIZE, (const char(*)[MAX_WORD_LEN])words, wordCount);
|
||||
if (placedWords > 0) {
|
||||
if (placedWords == wordCount) {
|
||||
printf("Info: %d Wörter geladen und platziert. Starte speil...\n", placedWords);
|
||||
showWordSalad(wordSalad, SALAD_SIZE);
|
||||
startGame(wordSalad, SALAD_SIZE, words, wordCount,WINDOW_WIDTH);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user