CLI-based maze-game: Difference between revisions

m
m (→‎{{header|Julia}}: background color)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 2,541:
{{libheader|Wren-iterate}}
An embedded script so we can use the ncurses library.
<syntaxhighlight lang="ecmascriptwren">/* cli_based_maze_gameCLI-based_maze_game.wren */
 
import "./dynamic" for Enum, Tuple, Struct
Line 2,960:
<br>
We now embed this in the following C program, build and run it.
<syntaxhighlight lang="c">/* gcc cli_based_maze_gameCLI-based_maze_game.c -o cli_based_maze_gameCLI-based_maze_game -lncurses -lwren -lm */
 
#include <stdio.h>
Line 3,121:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "cli_based_maze_gameCLI-based_maze_game.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,476

edits