|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.bio.CellularAutomata
org.generation5.bio.CellularAutomataLayered
org.generation5.demos.SwarmAntCA
| Nested Class Summary | |
protected class |
SwarmAntCA.SwarmAgent
|
| Field Summary | |
protected int |
foodSize
|
protected int[][] |
goals
|
protected int |
iterations
|
protected int |
nestSize
|
protected int |
nestX
|
protected int |
nestY
|
| Fields inherited from class org.generation5.bio.CellularAutomataLayered |
clrStates, collisionDetection, positionTest |
| 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 | |
|
SwarmAntCA()
Creates a new instance of SwarmAntCA |
protected |
SwarmAntCA(int size_x,
int size_y)
|
| Method Summary | |
protected int |
atFoodSource(DirectedCAAgent ca)
|
protected boolean |
atNest(DirectedCAAgent ca)
|
void |
doStep()
This abstract function is where the main workings of the CA should take place. |
void |
init()
This abstract function is where the initialization of the CA should take place. |
static void |
main(java.lang.String[] args)
|
void |
render(java.awt.Graphics graphics,
int pw,
int ph)
Draws the world state, then each automata. |
| Methods inherited from class org.generation5.bio.CellularAutomataLayered |
addAutomaton, addAutomaton, getCA, getCollisionDetection, getNumCAs, isCellFree, moveCAAbsolute, moveCARelative, removeAll, setCollisionDetection, setStateColour, setWorldSize |
| Methods inherited from class org.generation5.bio.CellularAutomata |
clearWorld, drawGrid, flipBuffer, getBackgroundColor, getCASize, getGeometry, getSizeX, getSizeY, getWorldAt, iterateCA, iterateCA, reset, setBackgroundColor, setCASize, setGeometry, setWorldAt, setWorldAtEx, setWorldAtRelative, setWorldColors, setWorldColour, translateGeometry, writeImage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int nestX
protected int nestY
protected int[][] goals
protected int iterations
protected int nestSize
protected int foodSize
| Constructor Detail |
public SwarmAntCA()
protected SwarmAntCA(int size_x,
int size_y)
| Method Detail |
public static void main(java.lang.String[] args)
args - the command line argumentspublic void doStep()
CellularAutomata
doStep in interface SteppabledoStep in class CellularAutomataprotected boolean atNest(DirectedCAAgent ca)
protected int atFoodSource(DirectedCAAgent ca)
public void init()
CellularAutomata
init in interface Steppableinit in class CellularAutomata
public void render(java.awt.Graphics graphics,
int pw,
int ph)
CellularAutomataLayered
render in interface Visualizablerender in class CellularAutomataLayeredgraphics - the graphics context.pw - the width of the context.ph - the height of the context.
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||