Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 public
Octocat-spinner-32 sample_worlds
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 sinatra_demo.rb
Octocat-spinner-32 world.rb
Octocat-spinner-32 world_spec.rb

Game of Life

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970 - Wikipedia


To see a web example of this codebase, go to

Project inspiration

Pete Yandell hosted a code retreat at Envato on August 27th in 2011 where we practised TDD pairing using the Game of Life as our problem. It was a bit tricky to bang out a solution in 45 minutes. This github project was created to think about it a bit more.

Running this codebase

$ git clone
$ cd game_of_life
$ ./world.rb --simulate sample_worlds/oscillator-blinking.gol

Codebase thoughts

This implementations board doesn't grow. It does however, simulate patterns which is enough for now.

The performance could definitely be optimised a lot - adding bigger worlds (eg. to the Gosper Glider Gun in the sample_worlds/ directory) is horriby slow.

It would also be interesting to test with infinity in mind - would the data type usage blow up memory allocation?

Things to consider for a future code retreat!

Something went wrong with that request. Please try again.