Skip to content

Commit

Permalink
added live cell feature
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyhaines committed Sep 21, 2009
1 parent 8ae2e42 commit ddff87a
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions features/live_cell.feature
@@ -0,0 +1,76 @@
Feature: Evolving a living cell
In order to create a functioning rules engine
As a programmer of Conway's Game of Life
I can evolve a single living cell

Scenario: Living cell with 0 neighbors dies
Given the following setup
| . | . | . |
| . | x | . |
| . | . | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 1 neighbor dies
Given the following setup
| . | x | . |
| . | x | . |
| . | . | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 2 neighbors lives
Given the following setup
| . | x | . |
| . | x | x |
| . | . | . |
When I evolve the board
Then the center cell should be alive

Scenario: Living cell with 3 neighbors lives
Given the following setup
| x | x | x |
| . | x | . |
| . | . | . |
When I evolve the board
Then the center cell should be alive

Scenario: Living cell with 4 neighbors dies
Given the following setup
| x | x | x |
| . | x | x |
| . | . | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 5 neighbors dies
Given the following setup
| x | x | x |
| x | x | x |
| . | . | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 6 neighbors dies
Given the following setup
| x | x | x |
| x | x | x |
| x | . | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 7 neighbors dies
Given the following setup
| x | x | x |
| x | x | x |
| x | x | . |
When I evolve the board
Then the center cell should be dead

Scenario: Living cell with 8 neighbors dies
Given the following setup
| x | x | x |
| x | x | x |
| x | x | x |
When I evolve the board
Then the center cell should be dead

0 comments on commit ddff87a

Please sign in to comment.