From 71e1f2dc8e9e1b3ee595a2712ec24d11ce243f1c Mon Sep 17 00:00:00 2001 From: physick Date: Sun, 12 Jul 2026 12:55:19 +0500 Subject: Result view --- src/puzzles/puzzle.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/puzzles/puzzle.h') 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 +#include #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 -- cgit v1.3