diff --git a/Startcode/README.md b/Startcode/README.md new file mode 100644 index 0000000..873b616 --- /dev/null +++ b/Startcode/README.md @@ -0,0 +1,9 @@ +# Wortsalat - Praktikum Informatik 2 + +Ein klassisches Wortsuchspiel, bei dem Wörter aus einer Textdatei zufällig horizontal oder vertikal in einem Gitter platziert werden. Der Spieler muss diese Wörter im Spielfeld finden. + +## Bedienung & Kompilierung + +1. **Eigenes Target bauen:** + + make wordsalad_myversion \ No newline at end of file diff --git a/Startcode/game.c b/Startcode/game.c index 6edd8ab..56bfbfd 100644 --- a/Startcode/game.c +++ b/Startcode/game.c @@ -42,7 +42,7 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi int attempts = 0; //MAximum Versuche, um eine passende Position zu finden, um ENdlosshleifen zu vermeiden - while(!placed && attempts < 100){ + while(!placed && attempts < 5000){ attempts++; int direction = rand() %2; // 0 = horizontal, 1 = vertical int row = 0; diff --git a/Startcode/runTests b/Startcode/runTests new file mode 100755 index 0000000..9ebc920 Binary files /dev/null and b/Startcode/runTests differ diff --git a/Startcode/wordsalad_myversion b/Startcode/wordsalad_myversion new file mode 100755 index 0000000..c310e95 Binary files /dev/null and b/Startcode/wordsalad_myversion differ