Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Publish features to http://RelishApp.com/ESambo/practice-game-of-life

  • Loading branch information...
commit 0ea47e36c6781e11b28b4b592a5064b074b096b3 1 parent ab2d82c
@esambo esambo authored
View
9 features/.nav
@@ -0,0 +1,9 @@
+- doc (Documentation):
+ - rules_of_life.md (Rules of Life)
+ - rules_of_simple_design.md (Rules of Simple Design)
+ - source_code.md (Source Code)
+- live_cell.feature
+- dead_cell.feature
+- multiple_cells.feature
+- static_structures.feature
+- multiple_generations.feature
View
20 features/README.md
@@ -0,0 +1,20 @@
+# Practice Game of Life
+
+## [Code Retreat](http://coderetreat.com)
+w/ [Corey Haines](http://www.twitter.com/coreyhaines)
+*- honing the craft together*
+
+Coderetreat is a day-long, intensive practice event, focusing on the fundamentals of software development and modular design, primarily the [4 Rules of Simple Design](http://c2.com/cgi/wiki?XpSimplicityRules):
+
+1. Tests Pass (green)
+2. Reveal Intent (good names)
+3. No Duplication (DRY)
+4. Small
+
+
+## Wikipedia: [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)
+
+The **Game of Life**, also known simply as **Life**, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
+
+The "game" is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves.
+
View
6 features/dead_cell.feature
@@ -1,7 +1,7 @@
Feature: Evolving a dead cell
- In order to create a functioning rules engine
- As a programmer of Conway's Game of Life
- I can evolve a single dead cell based
+ In order to create a functioning rules engine
+ As a programmer of Conway's Game of Life
+ I can evolve a single dead cell based
Scenario: Dead cell with 0 neighbors stays dead
Given the following setup
View
18 features/doc/rules_of_life.md
@@ -0,0 +1,18 @@
+Based on Wikipedia: Conway's Game of Life: [Rules](http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#Rules)
+
+The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square *cells*, each of which is in one of two possible states, *alive* or *dead*. Every cell interacts with its eight *neighbors*, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:
+
+### 1. Under-Population
+- Any live cell with *fewer than 2* live neighbors *dies*
+
+### 2. Next Generation
+- Any live cell with *2 or 3* live neighbors *lives* on
+
+### 3. Overcrowding
+- Any live cell with *more than 3* live neighbors *dies*
+
+### 4. Reproduction
+- Any dead cell with *exactly 3* live neighbors becomes a *live* cell
+
+The initial pattern constitutes the *seed* of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a *tick* (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations.
+
View
8 features/doc/rules_of_simple_design.md
@@ -0,0 +1,8 @@
+[4 Rules of Simple Design](http://c2.com/cgi/wiki?XpSimplicityRules):
+
+Based on the [SCNA 2011 Code Retreat](http://twitpic.com/7gz0k2)
+
+1. Tests Pass (green)
+2. Reveal Intent (good names)
+3. No Duplication (DRY)
+4. Small
View
3  features/doc/source_code.md
@@ -0,0 +1,3 @@
+## [Cucumber Features](http://cukes.info/)
+Building a Conways’ Game of Life simulator is a great way to practice different techniques in the language of your choice. This ***[git repository](https://github.com/coreyhaines/practice_game_of_life)*** contains a set of cucumber features that describe the rules of Conway’s Game of Life. I’ve also included a few standard, larger patterns that you can use to check multiple generation evolution.
+
View
6 features/live_cell.feature
@@ -1,7 +1,7 @@
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
+ 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
View
6 features/multiple_cells.feature
@@ -1,7 +1,7 @@
Feature: Evolving a grid with some cells in it
- In order to create a functioning rules engine
- As a programmer of Conway's Game of Life
- I can evolve a multiple cell grid
+ In order to create a functioning rules engine
+ As a programmer of Conway's Game of Life
+ I can evolve a multiple cell grid
Scenario: Sparse grid with nobody staying alive
Given the following setup
View
6 features/multiple_generations.feature
@@ -1,7 +1,7 @@
Feature: Evolving a grid over multiple generations
- In order to create a functioning rules engine
- As a programmer of Conway's Game of Life
- I can evolve a grid over multiple generations
+ In order to create a functioning rules engine
+ As a programmer of Conway's Game of Life
+ I can evolve a grid over multiple generations
Scenario: Cells come alive, then die off
Given the following setup
View
6 features/static_structures.feature
@@ -1,7 +1,7 @@
Feature: Cell configurations that are static
- In order to create a functioning rules engine
- As a programmer of Conway's Game of Life
- I can see static structures surviving in my world
+ In order to create a functioning rules engine
+ As a programmer of Conway's Game of Life
+ I can see static structures surviving in my world
Scenario: Block
Given the following setup
Please sign in to comment.
Something went wrong with that request. Please try again.