Skip to content

EconClass/tree-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree of Life

This is a visualizer for Conway's Game of Life traditional visualizers depict the game using a two dimensional grid or matrix that is iterated over for every cell in the game regardless of whether they are dead or alive. This ends up being pretty "slow", having a runtime complexity of O(n^2). However, by switching how the game is stored from a matrix to a quad-tree we can make the game a bit "faster", with a time complexity of O(n * log(n)).

Rules of the Game

  1. Any live cell with two or three neighbors survives.

  2. Any dead cell with EXACTLY three live neighbors becomes a live cell.

  3. All other live cells die in the next generation and all other dead cells stay dead.

About

A JavaScript implementation of Conway's Game of Life using a QuadTree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published