Here is an attempt at an implementation of Conway’s Game Of Life in Crystal:
It seems to work at first glance, but it might still be buggy.
If you have an interest in the topic and if you have time, please try it out and let me know what you think about it.
Nice! If you are curious, there’s an impmementation in the samples directory of Crystal: crystal/conway.cr at master · crystal-lang/crystal · GitHub
The reason I have structured it the way I did, is that I am thinking about implementing a parallel version in which there is no periodic scan of the cells from the “World” 's point of vue, but it which there is instead a process (fiber) per cell and in which each cells continuously scans its surrounding in its own independent process.
The parallel version still seems buggy at the moment, so I have not published it yet.
Sounds good! In the haste I forgot to mention that I just mentioned that code in case you wanted to compare yours with it :-)