Inspiration

Our APCS teacher mentioned in class and it sounded interesting. We decided to take it a step further and make a program.

What it does

It simulates cell growth across as many generations as you like.

Rules:

  1. A “neighbor” of a cell is defined as any living cell touching that cell. For example, a cell has 8 possible neighbors, but only the ones that are alive count as neighbors.

  2. Any living cell with one or zero neighbors will die of loneliness, while any living cell with four or more living neighbors will die from overcrowding. These are "deaths".

  3. Any living cell with two or three neighbors will continue living into the next generation (no change).

  4. Any dead cell with exactly three neighbors will come to life in the next generation. These are "births".

  5. All births and deaths occur simultaneously.

How we built it

We used IntelliJ as an IDE and Java as our language.

Challenges we ran into

The graphics were a little difficult to create. The logic for determining neighbors took some time and debugging.

Accomplishments that we're proud of

Graphics and the efficiency of the algorithm.

What we learned

We learned how to write efficient code and turn something simple into a complex structure.

What's next for Conway's Game of Life

Allow the user to add individual cells whenever they want. Add a pause button. Make the grid infinitely sized.

Built With

Share this project:

Updates