Compare commits

...

2 Commits
main ... main

Author SHA1 Message Date
Giorgi Kesidis
db1e31f237 21.10 2025-10-21 15:29:47 +02:00
Giorgi Kesidis
a9d6d69bc1 hallo 2025-10-14 15:09:42 +02:00
5 changed files with 11 additions and 7 deletions

View File

@ -13,7 +13,7 @@
// Creates the word salad by placing words randomly and filling empty spaces // Creates the word salad by placing words randomly and filling empty spaces
int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount) int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsigned int searchFieldLen, const char words[][MAX_WORD_LEN], unsigned int wordCount)
{ {
Printf("Hello World+1");
} }
// Prints the word salad to console // Prints the word salad to console

BIN
Start_Windows/input.o Normal file

Binary file not shown.

View File

@ -40,6 +40,10 @@ int main(int argc, char *argv[])
// Check if all words were successfully placed // Check if all words were successfully placed
// Start the game if successful // Start the game if successful
// error message if some words couldn't be placed // error message if some words couldn't be placed
if(wordCount != placedWords)
{
fprintf(stderr, "Error: %d out of %d were placed", placedWords, wordCount);
}
} }
else else
@ -48,6 +52,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Could not open file %s for reading ...\n", argv[1]); fprintf(stderr, "Could not open file %s for reading ...\n", argv[1]);
exitCode = EXIT_FAILURE; exitCode = EXIT_FAILURE;
} }
startGame(words)
} }
return exitCode; return exitCode;

View File

@ -1,9 +1,9 @@
CC = gcc CC = gcc
CFLAGS = -g -Wall -I$(raylibfolder) CFLAGS = -g -Wall
LDFLAGS = -lopengl32 -lgdi32 -lwinmm LDFLAGS = -lopengl32 -lgdi32 -lwinmm
BINARIES = ./windows BINARIES = ./windows
raylib_folder = ./raylib raylibfolder = ./raylib
unityfolder = ./unity unityfolder = ./unity
# -------------------------- # --------------------------
@ -12,24 +12,23 @@ unityfolder = ./unity
wordsalad_initial: wordsalad_initial:
$(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS) $(CC) -o wordsalad_initial $(BINARIES)/libwordsalad_complete.a $(BINARIES)/libraylib.a $(LDFLAGS)
# -------------------------- # --------------------------
# Normales Spiel bauen # Normales Spiel bauen
# -------------------------- # --------------------------
all: main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a all: main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a
$(CC) $(CFLAGS) -o wordsalad main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a $(LDFLAGS) $(CC) $(CFLAGS) -o wordsalad main.o input.o game.o graphicalGame.o $(BINARIES)/libraylib.a $(LDFLAGS)
main.o: main.c main.o: main.c
$(CC) -c $(CFLAGS) main.c $(CC) -c $(CFLAGS) main.c
input.o: input.c input.o: input.c
$(CC) -c $(CFLAGS)input.c $(CC) -c $(CFLAGS) input.c
game.o: game.c game.o: game.c
$(CC) -c $(CFLAGS) game.c $(CC) -c $(CFLAGS) game.c
graphicalGame.o: graphicalGame.c graphicalGame.o: graphicalGame.c
$(CC) -I$(raylib_folder) -c $(CFLAGS) graphicalGame.c $(CC) -I$(raylibfolder) -c $(CFLAGS) graphicalGame.c
# -------------------------- # --------------------------
# Unit Tests # Unit Tests

Binary file not shown.