diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-07-07 19:05:45 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-07-07 19:05:45 +0500 |
| commit | 1a095735b1d8e7ade61ac4f936032e0c9dcc044f (patch) | |
| tree | d4b61b54b170cf47e88381095baedb03eb26433d /src/puzzles/puzzle.c | |
| parent | de52d82dc62db5d6883cf870a2c3cdc08a178b4f (diff) | |
Resources loading
Diffstat (limited to 'src/puzzles/puzzle.c')
| -rw-r--r-- | src/puzzles/puzzle.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/puzzles/puzzle.c b/src/puzzles/puzzle.c new file mode 100644 index 0000000..8c2c3de --- /dev/null +++ b/src/puzzles/puzzle.c @@ -0,0 +1,21 @@ +#include "puzzle.h" +#include <stdlib.h> +#include <string.h> + +Puzzle *GetTestPuzzle() { + Puzzle *outp = malloc(sizeof(Puzzle)); + if (outp == NULL) return NULL; + + outp->Name = strdup("Test puzzle"); + outp->Description = strdup("In this puzzle you will have to return the input string"); + + return outp; +} + +void FreePuzzle(Puzzle *self) { + free(self->Name); + free(self->Description); + free(self->PrivateTests); + free(self->PublicTests); + free(self); +} |
