Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
TDD: Game of Life
Ruby
branch: develop

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
spec
.rvmrc
.travis.yml
Gemfile
Gemfile.lock
README.md
Rakefile
example.rb
gol.rb

README.md

Game of Life - TDD

Finished in approx. 2 hours.

All logic is tested. Only the ASCII output method is not, was only built to visualize the engine.

Everything is ugly. No refactorings. First try of MRI 1.9.3-p0 (and code is strictly 1.9.3!).

Nothing special. Nothing important. Just fun.

» Video «

Why?

Game of Life is fun. Read more: Conway's Game of Life.

TDD of this tiny code was inspired by this Screencast: Coding Conway’s Game of Life in Ruby the TDD Way with RSpec.

I thought he did it in a too complex way, for a simple GOL we only need to know the state changes in every tick, so the cell as an object was completely overdosed IMHO.

Future?

Maybe I give it a GUI, maybe not. Maybe I build some pattern tests, maybe not. Maybe I'll refactor, maybe not.

Maybe nothing.

Why WTF?

We should share code, publicly. Contribute code. Share knowledge, experience and love!

Free and open source

Take it, learn from it, make anything else with it.

Don't blame me.

copyleft

Visit me!

@ codecraft.io

Something went wrong with that request. Please try again.