-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish features to http://RelishApp.com/ESambo/practice-game-of-life
- Loading branch information
Showing
10 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters