https://github.com/samtay/conway
A terminal interface for Conway's Game of Life
https://github.com/samtay/conway
brick conway grid haskell terminal-app vty
Last synced: 9 days ago
JSON representation
A terminal interface for Conway's Game of Life
- Host: GitHub
- URL: https://github.com/samtay/conway
- Owner: samtay
- License: bsd-3-clause
- Created: 2017-03-09T04:48:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T03:43:58.000Z (over 5 years ago)
- Last Synced: 2025-04-01T12:04:06.743Z (6 months ago)
- Topics: brick, conway, grid, haskell, terminal-app, vty
- Language: Haskell
- Homepage:
- Size: 133 KB
- Stars: 61
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# conway [](https://travis-ci.org/samtay/conway)
A terminal interface for playing Conway's Game of Life
This is just a pet project that I thought would be a good exercise in Haskell.
The [Game of Life](https://en.wikipedia.org/wiki/Conway's_Game_of_Life) is a cellular automaton
with simple rules but emergent complexity - a quintessential complex system.
The frontend leverages [brick](http://hackage.haskell.org/package/brick)
while the backend is supported by custom zipper types implementing comonads.This codebase comes with a complementary article about the [performance benefits of comonads](https://samtay.github.io/posts/comonadic-game-of-life.html).
### installation
First [get stack](https://docs.haskellstack.org/en/stable/README/#how-to-install). Then
```shell
$ git clone https://github.com/samtay/conway.git
$ cd conway
$ stack build
# execute via stack
$ stack exec life
# alternatively, copy executable to ~/.local/bin
$ stack install life
$ life
```