A simple Game of Life implementation in Java
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Kevin Li f37ad33eab Hey look, a typo. il y a 11 ans
src/edu/stuy/goldfish Sprial pattern for Conway4 default. il y a 11 ans
.gitignore Whoops il y a 11 ans
LICENSE License il y a 11 ans
README.md Hey look, a typo. il y a 11 ans
build.xml What's the point of these? il y a 11 ans

README.md

goldfish

goldfish (GoLdfish) is a simple Game of Life implementation in Java.

Setup

Clone the project with:

git clone https://github.com/earwig/goldfish.git goldfish

The simplest way to build and run it is with Apache Ant:

cd goldfish
ant run

Alternatively, you can compile it using javac and run it with java:

cd goldfish/src
javac edu/stuy/goldfish/*.java edu/stuy/goldfish/rules/*.java
java edu.stuy.goldfish.Goldfish

Usage

When you start goldfish, you will be presented with a Gosper glider gun running under the standard Conway’s Game of Life rules. The buttons allow you to pause/unpause the simulation, reset it to the default glider gun (or whatever the default pattern is for the chosen algorithm), randomize the grid, and clear it completely. The slider allows you to set the maximum FPS that the simulation will run at.

By clicking on the screen and dragging your mouse, you can set the state of patches directly. This works best when paused. “Painting” over living patches will set their state as dead. In automata with multiple states, right-clicking will paint in a different state than left-clicking.

The algorithms menu allows you to switch to different cellular automaton rulesets.

Algorithms