Life
A ruby implementation of Conway's game of life.
Installation
$ gem install life
Usage
To use Life, run the life new
command. It can be used with the following options
--width
or-w
specifies how many cells wide the game will be--height
or-h
specifies how many cells high the game will be--generations
or-g
specifies how many generations the simulation will run
$ life new -w 3 -h 4 -g 5
This will create a 3x4 game that runs for 5 generations
When first creating a game, you will be prompted to enter which cells are initially alive.
TODO
- Ability to pass initial configuration as command-line option
- Animate instead of displaying all the generations
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request