Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Quenneville committed Sep 18, 2012
1 parent 9d356b5 commit 1db4e80
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ A ruby implementation of Conway's [game of life](http://en.wikipedia.org/wiki/Co

## Usage

TODO: Write usage instructions here
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

Expand Down
1 change: 1 addition & 0 deletions lib/life/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Base < Thor
method_option :width, :type => :numeric, :aliases => '-w', :desc => "Width of board", :required => true
method_option :height, :type => :numeric,:aliases => '-h', :desc => "Height of board", :required => true
method_option :generations, :type => :numeric,:aliases => '-g', :desc => "How many generations to display", :required => true

def new
seed = []
while yes? "Would you like to add a live cell to the grid? [Y/n]"
Expand Down

0 comments on commit 1db4e80

Please sign in to comment.