blob: 8c2c3ded169831fbb30aebf8685728c7f012df73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
}
|