Conway's Game of Life
Build:
$ gem build gameoflife.gemspec
and install:
$ gem install ./gameoflife-0.1.3.gem
Create simple csv file which contains coordinates. First row consider to contain field size (width, height). Each row after first consider to contain coordinates (x,y) of one live cell. Coordinates begins from 0 value, for example top left corner cell has x = 0, y = 0. Application produces console output for the each step. Pause between steps is about 2 seconds.
'X' - stands for live cell '_' - stands for dead cell
irb> require 'gameoflife'
irb> include Gameoflife
irb> init("filename")
irb> play
- Fork it ( https://github.com/[my-github-username]/gameoflife/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request