Logo: Relish

  1. Sign in

Project: Practice-game-of-life

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

Scenarios
Sparse grid with nobody staying alive
Given
the following setup
. . . . .
. x . x .
. . . . .
. x . x .
. . . . .
When
I evolve the board
Then
I should see the following board
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Over-crowded grid
Given
the following setup
. . . . .
. x x x .
. x x x .
. x x x .
. . . . .
When
I evolve the board
Then
I should see the following board
. . x . .
. x . x .
x . . . x
. x . x .
. . x . .
Multiple dead cells coming to life
Given
the following setup
. . . . .
. . . . .
. x x x .
. . . . .
. . . . .
When
I evolve the board
Then
I should see the following board
. . . . .
. . x . .
. . x . .
. . x . .
. . . . .

Last published almost 7 years ago by esambo.