I attended the awesome SimAlchemy workshop from James Edward Gray II at ElixirConf2016. It was a workshop on Elixir processes and OTP; we used them to build simulations.
This is my solution for a life-and-death-and-sex turtle simulation that Gray started. We actually got three versions of this code, and I solved all three of them. This is technically the last of the three which was a fix to his internal representation of "changes" (clearing a square, putting a turtle, putting a plant).
The tests all pass, and the simulation works. I've made my own additions and clean ups. See the commits on this repo to see my changes.
- Clone this repo.
mix deps.get
mix test
- Clone this repo.
mix deps.get
iex -S mix
Hit C-c C-c or C-\ to exit the simulation.