The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.[1] It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.
A Game of life implementation by React. You can learn more about Game of life on Wikipedi but in summary it's a game designed by Conway in 1970.
This game has 4 main rules which are:
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
It was interesting to me, because I think these rules apply to many things in life! There are very interesting patterns that can happen in this game! I'll encourage you to read the Wikipedia about properties of some of these patterns.
You can see a demo here
- Clone the repository
git clone https://github.com/mostafa-drz/game-of-life.git
- Install dependencies
yarn install
- Run the app
yarn start
It runs the App in a new tab on http://localhost:3000