Letzter Feinschliff

This commit is contained in:
hulwaja104499 committed 2026-11-02 20:50:18 +01:00
1 parent 26cbcd17e6
commit 7f3e18becf
3 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <string.h>
#define MAX_RAND_TRIES_PER_WORD 10
#define MAX_RAND_TRIES_PER_WORD 100
#define EMPTY_CHAR 0
// TODO: Spiellogik implementieren:
+4 -5
View File
@@ -9,7 +9,7 @@
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
int c;
unsigned int i = 0; // Wort
unsigned int i = 0; // Wort
unsigned int j = 0; // Zeichen im Wort
while ((c = fgetc(file)) != EOF)
@@ -18,9 +18,9 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
if (j > 0)
{
words[i][j] = '\0';
i++;
j = 0;
words[i][j] = '\0';
i++;
j = 0;
if (i >= maxWordCount)
{
@@ -53,6 +53,5 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
printf("%u. Entry: %s\n", idx + 1, words[idx]);
}
return (int)i;
}
+8 -1
View File
@@ -41,13 +41,20 @@ graphicalGame.o: $(codefolder)/graphicalGame.c
$(CC) -I$(raylibfolder) -c $(CFLAGS) $(codefolder)/graphicalGame.c
# --------------------------
# Unser Spiel bauen
# --------------------------
wordsalad_ourVersion: main.o graphicalGame.o $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a
$(CC) $(CFLAGS) -o wordsalad_ourVersion main.o graphicalGame.o $(BINARIES)/libwordsalad.a $(BINARIES)/libraylib.a $(LDFLAGS)
# --------------------------
# Unit Tests
# --------------------------
TEST_BIN = runTests
test: input.o game.o $(codefolder)/unit_tests.c $(unityfolder)/unity.c
$(CC) -Wall -I$(unityfolder) -o $(TEST_BIN) input.o game.o $(codefolder)/unit_tests.c $(unityfolder)/unity.c
$(CC) $(CFLAGS) -I$(unityfolder) -o $(TEST_BIN) input.o game.o $(codefolder)/unit_tests.c $(unityfolder)/unity.c
# --------------------------
# Clean
# --------------------------