Create a gist now

Instantly share code, notes, and snippets.

Embed
Conway's Game of Life Tutorial for the SSaurel's Blog
package com.ssaurel.gameoflife;
public class Cell {
public int x,y;
public boolean alive;
public Cell(int x, int y, boolean alive) {
this.x = x;
this.y = y;
this.alive = alive;
}
public void die() {
alive = false;
}
public void reborn() {
alive = true;
}
public void invert() {
alive = !alive;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment