public class HyperspaceAutomaton extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int[][] |
cells |
protected int |
currentColumn |
protected boolean |
doneWithIteration |
protected int |
height |
protected IntervalUtil |
interval |
protected int[][] |
next |
protected java.lang.String |
savedCells |
protected java.lang.String |
savedNext |
protected int |
width |
| Constructor and Description |
|---|
HyperspaceAutomaton(int width,
int height,
float minInterval,
float maxInterval) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float days) |
static int[][] |
decodeTiles(java.lang.String string,
int w,
int h) |
static java.lang.String |
encodeTiles(int[][] tiles) |
int[][] |
getCells() |
IntervalUtil |
getInterval() |
protected int |
getLiveCountAround(int x,
int y) |
static void |
main(java.lang.String[] args) |
void |
setLive(float fraction) |
protected void |
updateCells(float days) |
protected transient int[][] cells
protected transient int[][] next
protected java.lang.String savedCells
protected java.lang.String savedNext
protected IntervalUtil interval
protected boolean doneWithIteration
protected int currentColumn
protected int width
protected int height
public HyperspaceAutomaton(int width, int height, float minInterval, float maxInterval)
public IntervalUtil getInterval()
public void advance(float days)
public int[][] getCells()
protected void updateCells(float days)
public void setLive(float fraction)
protected int getLiveCountAround(int x, int y)
public static java.lang.String encodeTiles(int[][] tiles)
public static int[][] decodeTiles(java.lang.String string, int w, int h) throws java.util.zip.DataFormatException
java.util.zip.DataFormatExceptionpublic static void main(java.lang.String[] args) throws java.util.zip.DataFormatException
java.util.zip.DataFormatException