/game-of-life

Conways game of life simulator developed in React

Primary LanguageJavaScript

Conway's Game of Life Visualization

This is an implementation of Conway's Game of Life using React.js. The Game of Life is a cellular automaton devised by the mathematician John Conway. It is a zero-player game that simulates the evolution of a population of cells based on a set of rules.

Rules of the Game

The game is played on a grid of cells, where each cell can be either alive or dead. The evolution of the population is determined by the following rules:

  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 three live neighbors becomes a live cell, as if by reproduction.

These simple rules give rise to complex and interesting patterns as the generations progress.

Customization

The grid size and other configurations can be customized by modifying the code. Here are some possible customizations:

  • Adjust the size of the grid by changing the number of rows and columns.
  • Modify the rules of the game to create different variations.
  • Implement additional features such as color schemes, speed controls, or pattern presets.

Technologies Used

  • React.js: A JavaScript library for building user interfaces.
  • HTML5: The standard markup language for creating web pages.
  • CSS3: The style sheet language used for describing the look and formatting of a document.

Credits

This implementation of Conway's Game of Life was created by Apoorva Kaushik. It is inspired by the work of John Conway and countless other developers.