CLI-based maze-game: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→{{header|Julia}}: help display change) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 1,060:
function play()
print(Crayon(background=(0,0,0), foreground=(250,250,250))) # white on black
Screen.clear!(Screen.All())
game = Game()
Line 2,540 ⟶ 2,541:
{{libheader|Wren-iterate}}
An embedded script so we can use the ncurses library.
<syntaxhighlight lang="
import "./dynamic" for Enum, Tuple, Struct
Line 2,959 ⟶ 2,960:
<br>
We now embed this in the following C program, build and run it.
<syntaxhighlight lang="c">/* gcc
#include <stdio.h>
Line 3,120 ⟶ 3,121:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|