|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--tjhCreature
A creature in our psuedo-biological simulation consists of a tree structure of tjhCell's. Also, the creature has a separate genome representation that is copied when it reproduces. Otherwise, evolution would follow the Lamarkian model which ain't no good.
| Field Summary | |
protected tjhGene |
genome
the tree of tjhGene's that form the creature's genome |
boolean |
has_died
the applet class CellLife uses this to check if this creature died since it last looked |
protected tjh2dVector |
momentum
the current momentum (direction and speed) of the creature |
protected boolean |
pink_bounce
set to true if a pink bounce just occurred |
protected tjhCell |
root_cell
the tree of tjhCell's that form the creature's body |
protected static float |
SPEED
maximum speed of the creature |
| Constructor Summary | |
tjhCreature()
default constructor |
|
| Method Summary | |
boolean |
DoTimeStep(java.awt.Graphics g,
tjhBuckets buckets,
tjh2dVector limit)
main function that is called for the creature each time step in the simulation. |
void |
Draw(java.awt.Graphics g)
draw the creature |
void |
InheritFrom(tjhCreature other,
tjhBuckets buckets,
tjh2dVector limit)
this is a new creature, instantiate it from the genes of another (parent) creature |
boolean |
InitSimple(tjh2dVector limit,
tjhBuckets buckets)
initialize a simple creature from scratch |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected static final float SPEED
public boolean has_died
protected tjh2dVector momentum
protected tjhCell root_cell
protected tjhGene genome
protected boolean pink_bounce
| Constructor Detail |
public tjhCreature()
| Method Detail |
public boolean DoTimeStep(java.awt.Graphics g,
tjhBuckets buckets,
tjh2dVector limit)
public void InheritFrom(tjhCreature other,
tjhBuckets buckets,
tjh2dVector limit)
public boolean InitSimple(tjh2dVector limit,
tjhBuckets buckets)
public void Draw(java.awt.Graphics g)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||