Skip to content
Snake in Elixir
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
config
lib
test
.formatter.exs
.gitignore
LICENSE
README.md
mix.exs
mix.lock

README.md

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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.