The Game of Life is an example of a cellular automaton and a zero-player game. It takes place on an infinite two-dimensional grid in which cells can be ‘on’ (alive) or ‘off’ (dead), and is defined by a set of rules that jointly determine the state of a cell given the state of its neighbours.
✓ Every living cell with 2 or 3 neighboring cells "survives"
✓ Every cell with 4 or more neighbors dies from "overpopulation"
✓ Every cell with 1 or no neighbors dies from "loneliness"
✓ Each dead cell with 3 neighboring live cells, "revive"
My game of life is developed interactively by console, this way, you can see the progress of each generation.
Today's code | To update |
---|---|
|
First I have created a menu to perform different processes.
If you choose to place the cells manually, you will be prompted to enter the row and column.
If you decide to have the cells placed automatically, you will be asked how many groups you want to generate.
Once the cells have been introduced, either manually or automatically, a total reproduction of generations will be required to contemplate their evolution.
Contributions, issues, and feature requests are welcome! Give a ⭐️ if you like this project!