diff options
| author | physick <mynameisgennadiy@vk.com> | 2026-07-12 12:55:19 +0500 |
|---|---|---|
| committer | physick <mynameisgennadiy@vk.com> | 2026-07-12 12:55:19 +0500 |
| commit | 71e1f2dc8e9e1b3ee595a2712ec24d11ce243f1c (patch) | |
| tree | fe5d83589ef618dee9c34ff1a229cee851300f09 /src/puzzles/puzzle.h | |
| parent | 58a26ca05aacb4736e9e7e652badd43a8085d1f1 (diff) | |
Result view
Diffstat (limited to 'src/puzzles/puzzle.h')
| -rw-r--r-- | src/puzzles/puzzle.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/puzzles/puzzle.h b/src/puzzles/puzzle.h index 8f7ef0d..d530a89 100644 --- a/src/puzzles/puzzle.h +++ b/src/puzzles/puzzle.h @@ -1,11 +1,23 @@ #include <stddef.h> +#include <wren.h> #ifndef PUZZLE_H +// This is a param that would be placed in a slot +// https://wren.io/embedding/slots-and-handles.html#writing-slots typedef struct { - // TODO: figure it out - char *LuaSnippet; - char *ExpectedOutput; + WrenType type; + // We store this value as void * to generalize. The downside of this approach + // is an extenciva allocation + void *value; +} PuzzleIO; + +typedef struct { + // https://wren.io/embedding/calling-wren-from-c.html#getting-a-method-handle + char *MainMethodSignature; + + size_t argc; + PuzzleIO *argv; } Test; typedef struct { @@ -13,11 +25,8 @@ typedef struct { char *Description; /// The tests that are accessible for an end user - size_t PublicTestC; - Test *PublicTests; - - size_t PrivateTestC; - Test *PrivateTests; + size_t TestC; + Test *Tests; } Puzzle; // TODO |
