Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -1,13 +1,13 @@
subr fruit
rx = (random 20 - 1) * 5 + 2.5
ry = (random 20 - 1) * 5 + 2.5
rx = (randint 20 - 1) * 5 + 2.5
ry = (randint 20 - 1) * 5 + 2.5
.
subr start
fruit
game = 1
sx[] = [ 52.5 0 0 0 0 ]
sy[] = [ 52.5 0 0 0 0 ]
dir = random 4
dir = randint 4
timer 0
.
background 242

View file

@ -1,4 +1,4 @@
/* snake.wren */
/* Snake.wren */
import "random" for Random
import "./dynamic" for Enum, Lower

View file

@ -1,4 +1,4 @@
/* gcc snake.c -o snake -lncurses -lwren -lm */
/* gcc Snake.c -o Snake -lncurses -lwren -lm */
#include <stdio.h>
#include <stdlib.h>
@ -144,7 +144,7 @@ int main(int argc, char **argv) {
config.loadModuleFn = &loadModule;
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "snake.wren";
const char* fileName = "Snake.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
switch (result) {