v/examples/snek
2023-08-13 17:45:19 +03:00
..
index.html gg: add text rendering, keyboard event handling for JS and other fixes (#12932) 2021-12-22 12:26:52 +02:00
README.md gg: add text rendering, keyboard event handling for JS and other fixes (#12932) 2021-12-22 12:26:52 +02:00
snek.js.v gg: use html5_canvas_name as the name of the canvas in gg.js.v too, similarly to gg.c.v 2023-08-13 17:45:19 +03:00
snek.v vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00

snek

Snake game implemented using gg module.

Compiling & running

Compiling to binary

v -prod examples/snek/snek.v
./examples/snek/snek # run snek game!

Compiling to JS

v -b js_browser examples/snek/snek.js.v

And then open examples/snek/index.html in your favourite browser.