|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--morey.spore.Spore
A Spore is cell that can move, claim territory, and spawn off more spores. The main features are:
Here is a link to the source code
Processor,
RPolygon,
SporeAction,
Link| Field Summary | |
protected java.util.Stack |
commands
the commands for the life cycle of the spore |
protected int |
complexity
the complexity of its life cycle |
protected static int |
DONE
|
protected Link |
link
the Link to the world (to test collisions) |
protected double |
nextTime
the time till the next command |
protected RPolygon |
polygon
the physical body of the spore |
protected int |
sides
the number of sides of its polygon |
| Constructor Summary | |
Spore(java.util.Stack s,
double[] one,
double[] two,
int type)
construct a spore |
|
Spore(java.util.Stack s,
int complexity)
construct a spore .... |
|
| Method Summary | |
int |
compareTo(java.lang.Object other)
compares the nextTimes of the spores. |
boolean |
executeCurrentAction(Processor cpu)
executes the current action |
void |
setCurrentAction(Processor cpu)
sets up the current action. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected static final int DONE
protected RPolygon polygon
protected double nextTime
protected java.util.Stack commands
protected Link link
protected int complexity
protected int sides
| Constructor Detail |
public Spore(java.util.Stack s,
double[] one,
double[] two,
int type)
s - - a stack of instructions for the spore to performone - - the coodinate for the first point on RPolygontwo - - the coodinate for the second point on RPolygontype - - which group the Spore belongs
public Spore(java.util.Stack s,
int complexity)
s - - a stack of instructions for the spore to performcomplexity - - the complexity of the spore| Method Detail |
public void setCurrentAction(Processor cpu)
cpu - the processor that is controling the spores actionspublic boolean executeCurrentAction(Processor cpu)
cpu - the processor that is controling the spores actionspublic int compareTo(java.lang.Object other)
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||