diff --git a/.DS_Store b/.DS_Store index 8dd9870..55f2bbe 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/Start_Mac/Schwierigkeiten.rtf b/Start_Mac/Schwierigkeiten.rtf new file mode 100644 index 0000000..5e07a7e --- /dev/null +++ b/Start_Mac/Schwierigkeiten.rtf @@ -0,0 +1,80 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2865 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\paperw11900\paperh16840\margl1440\margr1440\vieww17080\viewh20220\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 + +\f0\fs24 \cf0 Schwierigkeiten:\ +1.\ +Puffergr\'f6\'dfen m\'fcssen \'fcberwacht werden bzw. eigene Gr\'f6\'dfen angeben. Sonst Overflow in fremden Speicher\ +\ +if (j < MAX_WORD_LEN - 1) \{ <\'97 Wichtig\ + word[j++] = c;\ +\ +\}\ +word[j] = '\\0';\ +\ +\ +2.\ +Logik in game.c nicht einfach. Vor allem f\'fcr createWordSalad.\ +Viele kleine Sonderf\'e4lle.\ +\ +3.\ +Makefile war auf Mac zwar installiert, aber befehle auf dem ersten Blick sehr kryptisch.\ +\ +\ +\ +\ +1. Fehler\ +\ +./make wordsalad \ +\ +gcc -c -g -Wall main.c\ +gcc -I -c -g -Wall graphicalGame.c\ +graphicalGame.c:5:10: fatal error: 'raylib.h' file not found\ + 5 | #include "raylib.h"\ + | ^~~~~~~~~~ \ +\ +Fehler war: Richtig ist:\ + \ +graphicalGame.o: graphicalGame.c graphicalGame.o: graphicalGame.c\ + $(CC) -I$(raylibfolder) -c $(CFLAGS) graphicalGame.c $(CC) -I$(raylib_folder) -c $(CFLAGS) graphicalGame.c\ +\ +\ +\ +\ +\ +2. Fehler\ +\ +./runtests\ +\ +unit_tests.c:133:test_readWords_simple:PASS\ +unit_tests.c:52:test_readWords_with_delimiters:FAIL: Expected 3 Was 2\ +unit_tests.c:135:test_readWords_empty_file:PASS\ +unit_tests.c:136:test_createWordSalad_all_fit:PASS\ +unit_tests.c:137:test_createWordSalad_too_small:PASS\ +\ +-----------------------\ +5 Tests 1 Failures 0 Ignored \ +FAIL\ +\ +Fehler war: Richtig ist:\ +\ +readWords war mit fscanf(\'84%s\'93, \'85) while ((ch = fgetc(file)) != EOF) \{\ + if (isalnum(c)) \{\ + \ +Trennt nur bei Whitespace trennt bei jedem != alnum\ +\ +\ +3. Fehler \ +\ +Manchmal startet das Programm nicht weil nur 14/15 W\'f6rtern komplett eingef\'fcgt werden k\'f6nnen.\ +\ +MAX_RAND_TRIES_PER_WORD 10 \'97> 100 ge\'e4ndert\ +\ +\ + \ +\ +\ +} \ No newline at end of file diff --git a/Start_Mac/game.c b/Start_Mac/game.c index a71ca5e..24595b5 100644 --- a/Start_Mac/game.c +++ b/Start_Mac/game.c @@ -4,7 +4,7 @@ #include // Wie oft versucht wird, ein Wort zufällig zu platzieren -#define MAX_RAND_TRIES_PER_WORD 10 +#define MAX_RAND_TRIES_PER_WORD 100 // Kennzeichen für leere Felder (wird später durch Buchstaben ersetzt) #define EMPTY_CHAR 0 diff --git a/Start_Mac/game.o b/Start_Mac/game.o index 95cf44d..a9bfd27 100644 Binary files a/Start_Mac/game.o and b/Start_Mac/game.o differ diff --git a/Start_Mac/wordsalad b/Start_Mac/wordsalad index 1feb635..66eaf8e 100755 Binary files a/Start_Mac/wordsalad and b/Start_Mac/wordsalad differ