Conway's Game of Life implemented in JavaFX.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
~Luiserebii~ 6891e60601
MIT License created.
1 year ago
.settings Revisiting project - made a few things private, beginning to refactor 4 years ago
bin Minor change "deleted: bin/.gitignore" not committed, doing so now to set git log to new git luis@serebii.io 1 year ago
fonts Added GUI, GUIController, small organization in view package. 4 years ago
music/soundfx Added 'Lens of Truth' sound effect for chaos mode 4 years ago
old readme Updated README; moved old README to seperate folder. 4 years ago
src Small mistype in GUI, from "Width" to "Width:" 4 years ago
.classpath Revisiting project - made a few things private, beginning to refactor 4 years ago
.project Revisiting project - made a few things private, beginning to refactor 4 years ago
LICENSE MIT License created. 1 year ago
README.md Updating README.md for image 1 year ago
README~ Revisiting project - made a few things private, beginning to refactor 4 years ago
build.fxbuild Finally, after hours trying to get a bug fixed, figured out .jar export! Just needed to be careful with filepaths; this project can serve as a good example of reliable FXML/CSS and @font-face filepath-ing 4 years ago

README.md

Conway’s Game Of Life

Game of Life implemented in JavaFX. Includes various options such as the ability to choose the size of the board, change the cells’ colors, and set the initial seed.



Image of Game Of Life Initialize Settings window

Features

Size input:

The length/width parameters set the board to a specific size, by pixels.

Color:

Color can be input by typing in a string that matches any one of the JavaFX Color API’s static fields: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/paint/Color.html. Hex color codes can also be input, as can RGB values through the following syntax: “#7FFFD4” and “rgb(127,255,212)” respectively. To set the color, press Enter while the color input box is in focus.
Rainbow: Checking the Rainbow option will lock the selected color, and cause cells to generate as random colors.

Seed:

This allows the user to select the initial seed. “Random Board” will generate a random initial seed, each cell having a 50% chance of being born. “10 Cell Seed” generates a row of 10 cells in the center.

Rules:

Leaving “Chaos Mode” unchecked will result in using the traditional Game Of Life rules. “Chaos Mode” is a modified version of the original, allowing for more cell survival. Try this with a 10 Cell Seed!

Initialization:

To generate a board of cells with the selected options, just click “Initialize Game of Life”!

Sample Board:

alt tag
Sample Game of Life board under default options. (600px x 400px)

Future Implementation

  • More seed options, perhaps even custom user seeds, which can be created through a simple UI and saved to file. “10 Cell Seed” could become “X Cell Seed,” perhaps with a box input on the right of the combobox to provide the X?
  • Rules insensitive to the board’s edges - the size of the board influences whether certain cells live or die, not quite the infinite grid Game of Life is supposed to be simulated on. Perhaps even allow the user to drag around and view more of the grid?
  • More rules options, custom user rules?
  • Color options for the game’s board
  • Color coding cells which never died/were never born
  • Allow for setting the pixel size of every cell
  • Better UI - current one is not the most attractive GUI

Appendix

A. Wikipedia: Conway’s Game of Life - Excellent Summary on the Algorithm: https://en.wikipedia.org/wiki/Conway’s_Game_of_Life

B. Conway’s Game Of Life on Stephen Hawking’s Grand Design, Episode 1 - “The Meaning of Life”: https://www.youtube.com/watch?v=CgOcEZinQ2I

C. Complex implementation of Conway’s Game Of Life (cool to watch!): https://www.youtube.com/watch?v=C2vgICfQawE

D. “Life in Life” - Meta Game Of Life: https://www.youtube.com/watch?v=xP5-iIeKXE8