|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.bio.CellularAutomata
org.generation5.demos.LangtonLoopCA
Implements Langton's self-replicating loop. The code is heavily based upon the Java applet by Eli Bachmutsky, available at: http://necsi.org/postdocs/sayama/sdsr/java/
| Field Summary | |
protected int[][][][][] |
rule
The rules are stored in a 5-dimensional array |
| 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 | |
LangtonLoopCA()
Creates a new instance of LangtonLoopCA |
|
LangtonLoopCA(int size_x,
int size_y)
Creates an instance of LangtonLoopCA with world size information. |
|
| Method Summary | |
void |
doStep()
Iterate the loop one timestep. |
void |
init()
Initialize the Langton loop. |
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 |
| Field Detail |
protected int[][][][][] rule
| Constructor Detail |
public LangtonLoopCA()
public LangtonLoopCA(int size_x,
int size_y)
LangtonLoopCA with world size information.
size_x - the x-size of the world.size_y - the y-size of the world.| Method Detail |
public static void main(java.lang.String[] args)
args - the command line argumentspublic void doStep()
doStep in interface SteppabledoStep in class CellularAutomatapublic void init()
init in interface Steppableinit in class CellularAutomata
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||