Conceived by mathematician John Horton Conway in 1970, the Game of Life is a cellular automaton that simulates the evolution of life in a discrete environment. The game is based on simple rules that determine the birth, death, and survival of cells in a two-dimensional grid.
This project presents an implementation of the Game of Life in java programming language. The code simulates the evolution of the game over multiple generations, following the rules defined by Conway:
- Birth: A dead cell with exactly three living cells in its neighborhood becomes alive in the next generation.
- Survival: A living cell with two living neighbors in the next generation remains alive.
- Isolation: A living cell with fewer than two living neighbors in the next generation dies of loneliness.
- Overcrowding: A living cell with more than three living neighbors in the next generation dies due to overcrowding.
As it was one of the questions in the first level of the OBI in 2024 and the only one that I couldn't finish in less time than the test, I felt challenged to finalize my algorithm and look for efficient ways to solve it.
- Download the JAR file
- Navigate to the location of the downloaded Jar file
- Execute the file with the command
java -jar JogoDaVida.jar
- Be happy :)