/gameofhaskell

Conway's Game of Life implementation in Haskell

Primary LanguageHaskellMIT LicenseMIT

Game Of Haskell

About

Conway’s Game of Life (en.wikipedia.org/wiki/Conway’s_Game_of_Life) implementation in Haskell, done as an excercise in Haskell BDD. Uses Hspec (github.com/trystan/hspec) for tests.

Usage

Running tests:
  $ runhaskell GameOfHaskellSpecs.hs

Running main program:
  $ runhaskell GameOfHaskell.hs

Development

The project utilizes guard (github.com/guard/guard), a tool that handles filesystem events. Here it is used to automatically run tests. Suggested workflow is as follows:

1. Enter project directory
  $ clone http://github.com/nbartlomiej/gameofhaskell; cd gameofhaskell

2. Install bundler, guard, guard-shell
  $ gem install bundler; bundle install

3. Run guard (will run tests on file change)
  $ guard

4. Write specs in *Specs.hs files, implement them in *.hs files

Origins

This project is loosely inspired by Global Day of Coderetreat 2011 (coderetreat.org/). The code itself hasn’t been written during that event (obviously; participants delete all their creations), but contains many afterthoughts. Many thanks to @powczarek (twitter.com/powczarek) for great Haskell pair programming session.

License

MIT, see LICENSE file.