Skip to content

Chrismis79/conways-game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

conways-game-of-life

Computer Science build week project using React

###Version by Christine Fletcher 7/2020

App deployed: https://conways-game-of-life-christine.netlify.app/

About John Conway's Game of Life

The Game of Life is a 0 player game. Meaning you start it and there is no interaction on the part of the player. It is based off a simple mathmatical algorithm to decide if a cell is to be born, lives, or dies in the next generation.

#Rules:

  • Each cell can have up to 8 neighbors, 4 sides + 4 diagonals.

  • Any cell with fewer than 2 live neighbors dies, as if by underpopulation.

  • Any cell with 2 or 3 neighbors lives onto the next generation.

  • Any cell with more than 3 live neighbors dies, as if by over population.

  • Any dead cell with exactly 3 neighbors is born to become alive in the next generation.

  • The algorithm to produce this logic loops through 2 arrays, rows and columns. It checks each cell on the grid and increments the count of neighbors for each cell. Following the rules above to decide if the cell remains dead, is born, stays alive, or dies.

  • This project was built using functional and class components. I do plan to refactor into functional components, using useState hook for state management.

  • The background photo is by Andrew Ridley on https://unsplash.com/

About

Computer Science build week project using React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published