smithers.extras
Class Cellular2D

java.lang.Object
  extended by smithers.extras.Cellular2D

public class Cellular2D
extends java.lang.Object


Nested Class Summary
static class Cellular2D.Ruleset
           
 
Field Summary
static Cellular2D.Ruleset DAY_NIGHT
           
static Cellular2D.Ruleset GAME_OF_LIFE
           
static Cellular2D.Ruleset HIGHLIFE
           
 
Constructor Summary
Cellular2D(Cellular2D.Ruleset rules, boolean[][] grid)
           
Cellular2D(Cellular2D.Ruleset rules, int width, int height)
           
 
Method Summary
 void clear()
           
 Cellular2D.Ruleset getRules()
           
 java.lang.String gridString()
           
static void main(java.lang.String[] args)
           
 void randomise(double p)
           
 void step()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAME_OF_LIFE

public static final Cellular2D.Ruleset GAME_OF_LIFE

HIGHLIFE

public static final Cellular2D.Ruleset HIGHLIFE

DAY_NIGHT

public static final Cellular2D.Ruleset DAY_NIGHT
Constructor Detail

Cellular2D

public Cellular2D(Cellular2D.Ruleset rules,
                  int width,
                  int height)

Cellular2D

public Cellular2D(Cellular2D.Ruleset rules,
                  boolean[][] grid)
Method Detail

getRules

public Cellular2D.Ruleset getRules()

randomise

public void randomise(double p)

clear

public void clear()

step

public void step()

gridString

public java.lang.String gridString()

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException