Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psibi/game-of-life
Game of Life
https://github.com/psibi/game-of-life
Last synced: 13 days ago
JSON representation
Game of Life
- Host: GitHub
- URL: https://github.com/psibi/game-of-life
- Owner: psibi
- Created: 2013-09-17T06:37:00.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-15T08:38:20.000Z (almost 11 years ago)
- Last Synced: 2024-10-12T00:01:22.621Z (about 1 month ago)
- Language: Haskell
- Homepage:
- Size: 137 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##A haskell solution for Conway's GAME OF LIFE
### Internals
type Location = (Int, Int)
Represents the Location of the Cell.
data Cell = Alive | Dead
Represents whether the Cell is Alive or Dead.
type World = [(Location, Cell)]
Represents the entire world with it's state. A sample world's location
is represented like this:+---+---+---+---+
|0,0|0,1|0,2|0,3|
| | | | |
+---+---+---+---+
|1,0|1,1|1,2|1,3|
| | | | |
+---+---+---+---+
|2,0|2,1|2,2|2,3|
| | | | |
+---+---+---+---+
|3,0|3,1|3,2|3,3|
| | | | |
+---+---+---+---+The world is assumed to be in an rectangular grid.