/snake

Snake in Elixir

Primary LanguageElixirISC LicenseISC

Snake

asciicast

This was intended to try out ex_ncurses. Don't be disappointed if there are bugs or if you lose.

Running

First clone this project and do the following:

mix deps.get
iex -S mix
iex(1)> Snake.run

You can control the snake using the arrow keys, VI keys (hjkl), or wasd.

Creating the demo GIF

I used Asciinema to record the video and asciicast2gif to convert it to a gif. Here's a rough commandline:

asciinema rec
# do stuff
# CTRL+D when done. Upload video and note video number for the next line.
docker run --rm -v $PWD:/data asciinema/asciicast2gif https://asciinema.org/a/174483.json assets/demo.gif

Oddly enough asciicast2gif loses the arena border. No idea why.