Skip to content

edmz/fuego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuego

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

About

Ascii Fire Effect Demo in Elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages