Skip to content

NicolasR27/GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Game Of Life Coding Excercise

For this exercise you will create an implementation of Conway’s Game of Life. The Game of Life consists of a grid of square cells, each of which is in two possible states, alive  or dead. Every cell interacts with its eight neighbors, which are the cells that are horizontally, vertically, or diagonally adjacent. 

Each turn in the game is a new generation of cells. At each generation the following changes occur:

  1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
  2. Any live cell with two or three live neighbors lives on to the next generation.
  3. Any live cell with more than three live neighbors dies, as if by overpopulation.
  4. Any dead cell with exactly 3 live neighbors becomes a live cell, as if by reproduction

The rules can be summarized into the following:

  1. Any live cell with two to three neighbors survives.
  2. Any dead cell with three live neighbors becomes a live cell.
  3. All other live cells die in the next generation. All other dead cells stay dead.

The game is started with a seed that defines the state of each cell in the grid. The first generation is created by applying the rules simultaneously to every cell in the seed. The rules continue to be applied repeatedly to create further generations. The final product of the exercise should include:

  1. The ability to set the initial seed for the game.
  2. A UI that displays the current generation of the grid.
  3. A UI affordance for advancing the game one generation at a time.
  4. The grid must be at least 10 columns and 10 rows. The exercise should be completed as a working iOS app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages