First working version

Run with `ruby main.rb | ruby render.rb game.gif`.