org.generation5.demos
Class WireWorldCA

java.lang.Object
  extended byorg.generation5.bio.CellularAutomata
      extended byorg.generation5.demos.WireWorldCA
All Implemented Interfaces:
Steppable, Visualizable

public class WireWorldCA
extends CellularAutomata

This implements the simple cellular automata, Wire World. Wire World is an excellent sample CA since you can easily demonstrate its universal computing properties.


Field Summary
 
Fields inherited from class org.generation5.bio.CellularAutomata
bufferPosition, bufferSize, caSize, caWorld, caWorld_x, caWorld_y, clrBackground, clrGrid, clrWorld, DOUBLE_BUFFERING, doubleBuffering, drawGrid, ENCLOSED, geometryType, INFINITE, TORODIAL, X_AXIS, Y_AXIS
 
Constructor Summary
WireWorldCA()
          Creates a new instance of WireWorldCA
WireWorldCA(int size_x, int size_y)
          Creates a new instance of WireWorldCA with dimensional information.
 
Method Summary
 void doStep()
          Iterate the CA one time-step.
 void init()
          Initialize WireWorld.
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.generation5.bio.CellularAutomata
clearWorld, drawGrid, flipBuffer, getBackgroundColor, getCASize, getGeometry, getSizeX, getSizeY, getWorldAt, iterateCA, iterateCA, render, reset, setBackgroundColor, setCASize, setGeometry, setWorldAt, setWorldAtEx, setWorldAtRelative, setWorldColors, setWorldColour, setWorldSize, translateGeometry, writeImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WireWorldCA

public WireWorldCA()
Creates a new instance of WireWorldCA


WireWorldCA

public WireWorldCA(int size_x,
                   int size_y)
Creates a new instance of WireWorldCA with dimensional information.

Parameters:
size_x - the x-size of the CA world.
size_y - the y-size of the CA world.
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments

doStep

public void doStep()
Iterate the CA one time-step.

Specified by:
doStep in interface Steppable
Specified by:
doStep in class CellularAutomata

init

public void init()
Initialize WireWorld.

Specified by:
init in interface Steppable
Specified by:
init in class CellularAutomata

This documentation is part of the Generation5 JDK.