Browse Source

Puzzelbrettspeicher ergänzt, Emman Mensdorf

main
Emman Mensdorf 11 months ago
parent
commit
3959f2bfae
  1. 12
      src/schach_in_ein_puzzle/PuzzleI.c
  2. 1
      src/schach_in_ein_puzzle/PuzzleI.h

12
src/schach_in_ein_puzzle/PuzzleI.c

@ -60,3 +60,15 @@ void print_Puzzlebrett(char** Brett) {
} }
printf("\n"); printf("\n");
} }
void Puzzlebrettspeicher_freigeben(char** Brett) {
if (Brett == NULL) {
return;
}
for (int i = 0; i < 8; i++) {
free(Brett[i]);
}
free(Brett);
}

1
src/schach_in_ein_puzzle/PuzzleI.h

@ -5,5 +5,6 @@
char** Puzzlebrett_erstellen(); char** Puzzlebrett_erstellen();
void print_Puzzlebrett(char** Brett); void print_Puzzlebrett(char** Brett);
void Puzzlebrettspeicher_freigeben(char** Brett);
#endif // PUZZLEI_H #endif // PUZZLEI_H
Loading…
Cancel
Save