Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rst0git/game-of-life-haskell
Implementation of Game of Life in Haskell
https://github.com/rst0git/game-of-life-haskell
game-of-life haskell
Last synced: about 7 hours ago
JSON representation
Implementation of Game of Life in Haskell
- Host: GitHub
- URL: https://github.com/rst0git/game-of-life-haskell
- Owner: rst0git
- Created: 2017-04-22T10:20:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-22T10:48:35.000Z (over 7 years ago)
- Last Synced: 2023-02-27T03:02:13.043Z (over 1 year ago)
- Topics: game-of-life, haskell
- Language: Haskell
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Game-of-Life-Haskell
Implementation of Game of Life in Haskell# Description
The game models simple evolutionary system based on cells, and is played on a two-dimensional board. Each square on the board is either empty, or contains a single living cell, as illustrated in the following example:```
||==========================||
|| | | | | | | ||
||--------------------------||
|| | | | 0 | | | ||
||--------------------------||
|| | | | 0 | 0 | 0 | ||
||--------------------------||
|| | | | | 0 | | ||
||--------------------------||
|| | | | | | 0 | ||
||==========================||
```# Rules
Given an initial configuration of the board, the next generation if the board is given by simultaneously applying the following rules:
- a living cell survives if it has precisely 2 or 3 neighbouring squares that contain living cells, and
- an empty square gives birth to a living cell if it has precisely 3 neighbours that contain living cells, and remains empty otherwise.# Game Demo
![Game Demo](https://github.com/rst0git/Game-of-Life-Haskell/raw/master/GameOfLife.gif)# Reference
The materials were gathered from the book "Programming in Haskell" http://www.cs.nott.ac.uk/~pszgmh/pih.html