game.c bugfix

This commit is contained in:
maxgrf 2025-11-06 11:55:49 +01:00
parent c596dc20c3
commit 6a3b7700e8
6 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,6 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
srand(time(NULL));
int placedWords = 0;
unsigned int succesfully_placed = 0;
unsigned int tries = 0;
unsigned int check_direction = 0, check_overlap = 0;
int zeile = 0, spalte = 0, len = 0;
@ -72,8 +71,10 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
check_overlap = 1;
}
if(check_overlap == 0)
{
tries++;
break;
}
}
//3. Schritt: Wort in Wortsalat schreiben

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -38,6 +38,7 @@ TEST_BIN = runTests
test: input.o game.o unit_tests.c
$(CC) $(CFLAGS) -I$(unityfolder) -o $(TEST_BIN) input.o game.o unit_tests.c $(BINARIES)/libunity.a
# --------------------------
# Clean
# --------------------------

Binary file not shown.