|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmadkit.kernel.AbstractAgent
turtlekit.kernel.Turtle
turtlekit.simulations.hunt2.Animat
public abstract class Animat
| Field Summary | |
|---|---|
protected int |
life
|
protected int |
visionRadius
|
| Fields inherited from class turtlekit.kernel.Turtle |
|---|
East, North, NorthEast, NorthWest, South, SouthEast, SouthWest, TURTLE_DEFAULT_ROLE, West |
| Constructor Summary | |
|---|---|
Animat(int visionRadius,
int initLife)
|
|
| Method Summary | |
|---|---|
protected void |
consumeResource()
|
protected void |
eatPrey(Animat target)
|
int |
getLife()
|
protected void |
move()
|
protected void |
reproduce()
|
java.lang.String |
toString()
|
| Methods inherited from class turtlekit.kernel.Turtle |
|---|
activate, bk, countTurtlesAt, countTurtlesHere, createTurtle, defaultAction, die, distance, distanceNowrap, dropMark, dropMarkAt, dx, dy, end, fd, getColor, getHeading, getHidden, getMark, getMarkAt, getPatchColor, getPatchColorAt, getPatchVariable, getPatchVariableAt, getSimulationGroup, getTurtleWithID, getWorldHeight, getWorldWidth, giveUpRole, home, incrementPatchVariable, incrementPatchVariableAt, isMarkPresent, isMarkPresentAt, isPlayingRole, moveTo, moveTo, mySelf, playRole, randomHeading, realX, realY, setColor, setHeading, setHidden, setPatchColor, setPatchColorAt, setup, setX, setXY, setY, towards, towardsNowrap, turnLeft, turnRight, turtlesAt, turtlesHere, xcor, ycor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int life
protected int visionRadius
| Constructor Detail |
|---|
public Animat(int visionRadius,
int initLife)
| Method Detail |
|---|
protected final void move()
protected final void consumeResource()
public final int getLife()
public java.lang.String toString()
toString in class Turtleprotected final void eatPrey(Animat target)
protected final void reproduce()
throws java.lang.SecurityException
java.lang.SecurityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||