This a text-base fire effect demo. You really have to squint your eyes and use your imagination for it to work.
I got the inspiration to this while seeing an animated gif at a talk at ElixirConf. Also, as an exercise because I didnt know how to model a two dimensional array in Elixir.
I added a test to the fire calculation so that anyone can try to calculate the average, since my method of doing this doesnt look elegant at all. Functional maybe, but elegant, I dont think so.
If you are interested in implementing another solution to the average of the two dimentional array, just reimplement the Canvas.average/3 function and run the tests.
Please make any comments regarding any part of this code.
This is the first time ever that I use ncurses, so I couldnt find a way to add color to it. Once I find out how to do that, it will definitely look better.
Run it with:
$ mix run -e Fuego.burn