turtlekit.simulations.hunt2CyanVsBlue
Class Animat

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by turtlekit.kernel.Turtle
          extended by turtlekit.simulations.hunt2CyanVsBlue.Animat
All Implemented Interfaces:
java.io.Serializable, ReferenceableAgent
Direct Known Subclasses:
Blue, Cyan

public abstract class Animat
extends Turtle

Version:
2.0 25/02/2007
Author:
Fabien MICHEL
See Also:
Serialized Form

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()
           
 int getLife()
           
protected  void move()
           
 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 madkit.kernel.AbstractAgent
broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, destroyGroup, disposeMyGUI, foundGroup, getAddress, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, hideMyGUI, initGUI, isBelongingToGroup, isBelongingToGroup, isCommunity, isGroup, isGroup, isMemberOf, isMemberOf, isMessageBoxEmpty, isRole, isRole, joinGroup, killAgent, launchAgent, launchAgent, leaveGroup, leaveGroup, leaveRole, leaveRole, nextMessage, print, println, receiveMessage, redisplayMyGUI, requestRole, requestRole, requestRole, restoreAgent, sendMessage, sendMessage, sendMessage, setBean, setController, setDebug, setGUIObject, setName, setOutput, setOutputWriter, windowClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

life

protected int life

visionRadius

protected int visionRadius
Constructor Detail

Animat

public Animat(int visionRadius,
              int initLife)
Method Detail

move

protected void move()

consumeResource

protected void consumeResource()

getLife

public final int getLife()
Returns:
the life

toString

public java.lang.String toString()
Overrides:
toString in class Turtle


Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.