Tagged: Processing

Game Of Life

Game rules:

  1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
  2. Any live cell with more than three live neighbours dies, as if by overcrowding.
  3. Any live cell with two or three live neighbours lives on to the next generation.
  4. Any dead cell with exactly three live neighbours becomes a live cell

You may need to click it to get keyboard focus:)
How to play:

  1. Click a cell to kill or give birth to it.
  2. Press ‘c’ to clear cells.
  3. Press ‘r’ to randomize cells.
  4. Press ‘d’ to generate glider gun pattern.
  5. Press ‘g’ to run.
  6. Press ’s’ to run by step.
  7. Press ‘p’ to pause.

Made with Processing

Source code

HTML Code:

<applet code=GameOfLife.class archive=”http://www.floatingvectors.com/blog/wp-content/uploads/2009/09/GameOfLife.jar” width=601 height=361></applet>

Reference:

Running JAR-Packaged Software.

Game Of Life