turtlekit.simulations.termitesSorting
Class Termite

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by turtlekit.kernel.Turtle
          extended by turtlekit.simulations.termitesSorting.Termite
All Implemented Interfaces:
java.io.Serializable, ReferenceableAgent

public class Termite
extends Turtle

Termite

Version:
1.1 6/12/1999
Author:
Fabien MICHEL
See Also:
Serialized Form

Field Summary
 
Fields inherited from class turtlekit.kernel.Turtle
East, North, NorthEast, NorthWest, South, SouthEast, SouthWest, TURTLE_DEFAULT_ROLE, West
 
Constructor Summary
Termite()
          the first time behavior of a turtle will be "searchForChip"
 
Method Summary
 java.lang.String findEmptyPatch()
          findEmptyPatch is a one time step behavior corresponding to a list of actions.
 java.lang.String findNewPile()
          another one step behavior
 java.lang.String getAway()
           
 java.lang.String searchForChip()
           
 void setup()
          it is compulsory to redefine this method.
 
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, setX, setXY, setY, toString, 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
 

Constructor Detail

Termite

public Termite()
the first time behavior of a turtle will be "searchForChip"

Method Detail

setup

public void setup()
it is compulsory to redefine this method. Even empty.

Overrides:
setup in class Turtle

getAway

public java.lang.String getAway()

searchForChip

public java.lang.String searchForChip()

findNewPile

public java.lang.String findNewPile()
another one step behavior


findEmptyPatch

public java.lang.String findEmptyPatch()
findEmptyPatch is a one time step behavior corresponding to a list of actions. So this method will be entirely executed, sure that no other turtle of the simulation is actived. It returns a String as the behavior that the turtle will take for the next time step



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