generated from freudenreichan/info2Praktikum-Wortsalat
game.c bugfix
This commit is contained in:
parent
c596dc20c3
commit
6a3b7700e8
@ -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.
@ -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.
Loading…
x
Reference in New Issue
Block a user