Skip to content

bryhasagithub/conway-gol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's Game of Life

Conway's Game of Life is a cellular automaton "game" which evolves over time from simple patterns and a simple set of rules. You will need to implement these rules and display the results to the user.

Live Demo here:

You can check out the working app here

Rules :

  • Every cell interacts with it's 8 neighbours
    • neighbors: cells horizontally, vertically, or diagonally adjacent
  • At each step in time (generation) the following transitions occur:
    • any live cell with fewer than 2 living neighbors dies, (as if caused by underpopulation)
      • if (living_neighbors < 2 ) this.cell = dead
    • any living cell with 2 or 3 living neighbors lives on to the next generation
      • if (living_neighbors == 2 || living_neighbors == 3 ) this.cell = alive
    • any live cell with more than 3 living neighbors dies (overcrowded)
      • if (living_neighbors > 3) this.cell = dead
    • any dead cell with exactly 3 live neighbours becomes a live cell (as if by reproduction)****
      • if (this.cell.state == "dead" && living_neighbors == 3) this.cell = alive

Tech Stack

  • React webapp created with create-react-app
  • logic/rules written with Javascript

Styling

  • Color palate:
    • #2b2b2b
    • #3498db
    • #FF9666
    • #FFE184
    • #F5E9BE

About

Simple React webapp for Conway's Game of Life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published