A Phoenix LiveView implementation of Conway's Game of Life.
Life is an umbrella application in order to better separate the core game context (Life
) from the interface (LifeWeb
).
In this way, it's easier to extract the core implementation to use with other interfaces (like terminal or a different framework).
The main modules are Life.Grid
(game core functions) and LifeWeb.PageLive
(LiveView implementation).
For now the initial input comes from the configuration defined inside config/grid.exs
. As we only keep track of the alive cells, all you need to do to change the initial input is to add the two-dimensional alive positions as tuples to the List.
- Show the current generation count
- Add Start/Pause/Reset buttons
- Enable initial input editing from the webpage
- Add tick speed controls
- Improve style
- Install dependencies with
mix deps.get
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.