This program was my honors project for a course covering Object Oriented Programming.
It simulates Conway's Game of Life and is written in Java using the Swing framework for the GUI.
The main class which creates a JFrame displaying an instance of...
Exactly what it says on the tin. Handles the graphic aspect of the program and manages an instance of...
Implements the game logic. The rules are quite simple. A grid of cells steps evolves under the following conditions:
- A live cell with less than two live neighbors dies.
- A live cell with two or three live neighbors stays alive.
- A dead cell with three live neighbors comes to life.
- A live cell with more than three live neighbors dies.
More information can be found on its Wikipedia page.
Stable, if not optimized. While the program has no performance issues, it is a naïve implementation consisting solely of a two-dimensional array which is fully copied to calculate the next generation.
- Reduce memory usage by using line buffers rather than an entirely new array.
- Implement tracking of dead zones (i.e. skip cells guaranteed not to come to life).
- Implement more sophisticated algorithm. Hashlife? Perhaps as a challenge.