This is a first take on Game of Life. It only exploits the most basic Elixir features like functions, lambdas, and pattern matching.
[gist id=5963465]Study Notes: Conway’s Game of Life in Elixir
4 comments
Comments are closed.
Avdi Grimm, Code Cleric
This is a first take on Game of Life. It only exploits the most basic Elixir features like functions, lambdas, and pattern matching.
[gist id=5963465]Comments are closed.
Very cool! I chose the same problem for my first Elixir program, but I don’t have any visual component. My input is a list of live cells. If you’re interested it’s here: https://github.com/gvaughn/elixir_kata/tree/master/conway
I had a function just like your neighbor_coords that I refactored into a list comprehension
Cool, good idea. I’ve learnt quite a lot from that so thank you. There’s a tiny syntax error in there on line 45 there should be a comma before the do
def next_state(“.”, _), do: “.”
Thanks. I’m pretty sure that bug is fixed in the current version of the gist.
join the life of ruby buzzwords
ruby webrtc