https://github.com/emadb/gol_ex
Game of life in Elixir
https://github.com/emadb/gol_ex
elixir game-of-life kata
Last synced: 10 months ago
JSON representation
Game of life in Elixir
- Host: GitHub
- URL: https://github.com/emadb/gol_ex
- Owner: emadb
- Created: 2019-05-23T16:27:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T13:40:30.000Z (about 7 years ago)
- Last Synced: 2025-02-05T05:29:38.484Z (over 1 year ago)
- Topics: elixir, game-of-life, kata
- Language: Elixir
- Size: 7.98 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Game of life kata
This Kata is about calculating the next generation of Conway’s game of life, given any starting position. See http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life for background.
You start with a two dimensional grid of cells, where each cell is either alive or dead. In this version of the problem, the grid is finite, and no life can exist off the edges. When calcuating the next generation of the grid, follow these rules:
1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
2. Any live cell with more than three live neighbours dies, as if by overcrowding.
3. Any live cell with two or three live neighbours lives on to the next generation.
4. Any dead cell with exactly three live neighbours becomes a live cell.
You should write a program that can accept an arbitrary grid of cells, and will output a similar grid showing the next generation.
```
# on the server
iex --sname gol --cookie ema -S mix
```
```
# on the client
iex --sname client --remsh gol@macbookpro --cookie ema
```