From 1a095735b1d8e7ade61ac4f936032e0c9dcc044f Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Tue, 7 Jul 2026 19:05:45 +0500 Subject: Resources loading --- src/puzzles/puzzle.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/puzzles/puzzle.c (limited to 'src/puzzles/puzzle.c') 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 +#include + +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); +} -- cgit v1.3