A simple Game of Life implementation in Java
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.

README.md 2.0 KiB

11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. goldfish
  2. ========
  3. **goldfish** (GoLdfish) is a simple Game of Life implementation in Java.
  4. Setup
  5. -----
  6. Clone the project with:
  7. git clone https://github.com/earwig/goldfish.git goldfish
  8. The simplest way to build and run it is with
  9. [Apache Ant](http://ant.apache.org/):
  10. cd goldfish
  11. ant run
  12. Alternatively, you can compile it using `javac` and run it with `java`:
  13. cd goldfish/src
  14. javac edu/stuy/goldfish/*.java edu/stuy/goldfish/rules/*.java
  15. java edu.stuy.goldfish.Goldfish
  16. Usage
  17. -----
  18. When you start goldfish, you will be presented with a
  19. [Gosper glider gun](http://www.conwaylife.com/wiki/Gosper_glider_gun) running
  20. under the standard
  21. [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway's_Game_of_Life)
  22. rules. The buttons allow you to pause/unpause the simulation, reset it to the
  23. default glider gun (or whatever the default pattern is for the chosen
  24. algorithm), randomize the grid, and clear it completely. The slider allows you
  25. to set the maximum FPS that the simulation will run at.
  26. By clicking on the screen and dragging your mouse, you can set the state of
  27. patches directly. This works best when paused. "Painting" over living patches
  28. will set their state as dead. In automata with multiple states, right-clicking
  29. will paint in a different state than left-clicking.
  30. The *algorithms* menu allows you to switch to different cellular automaton
  31. rulesets.
  32. ### Algorithms
  33. * **Conway**: a standard
  34. [Conway's Game of Life](http://en.wikipedia.org/wiki/Conway's_Game_of_Life)
  35. simulator.
  36. * **Conway4**: equivalent to Conway, but patches use their
  37. [von Neumann neighborhood](http://en.wikipedia.org/wiki/Von_Neumann_neighborhood)
  38. instead of their
  39. [Moore neighborhood](http://en.wikipedia.org/wiki/Moore_neighborhood).
  40. * **Life Without Death**: equivalent to Conway, but patches do not die.
  41. * [**Brian's Brain**](http://en.wikipedia.org/wiki/Brian's_Brain): a
  42. three-state automaton with an "alive", "dying", and "off" state. Generally
  43. more chaotic than Conway with interesting patterns.