jdfrens / turtles

Turtle simulation in Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jeremy's Version of JEG2's Turtle Simulation

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.

Running the tests

  1. Clone this repo.
  2. mix deps.get
  3. mix test

Running the simulation

  1. Clone this repo.
  2. mix deps.get
  3. iex -S mix

Hit C-c C-c or C-\ to exit the simulation.

About

Turtle simulation in Elixir


Languages

Language:Elixir 100.0%