edu.turtlekit2.demos.pheromones
Class EmitMovingTurtle

java.lang.Object
  extended by madkit.kernel.AbstractAgent
      extended by edu.turtlekit2.kernel.agents.Turtle
          extended by edu.turtlekit2.demos.pheromones.EmitMovingTurtle
All Implemented Interfaces:
Serializable, madkit.kernel.ReferenceableAgent

public class EmitMovingTurtle
extends Turtle

Titre : EmitMovingTurtle

Description : A random moving Turtle emitting flavors.

XML Attributes :

FlavorToEmit1, FlavorToEmit2, etc. : the emitted flavors/pheromones. Can't be omitted.

Quantity1, Quantity2, etc.: the quantity of emitted flavors

Quantity: Override quantity1, etc., all flavors are emitted with this quantity. default is 1000.

Frequency1,Frequency2, etc.: Flavor1 is emitted each "Frequency1" steps. default is 1.

Frequency: Override Frenquency1, etc. default is 1.

Speed: the speed of the turtle. Expressed in distance per step of simulation. default is 1

Version:
1.0 - 04/2007
Author:
Gregory Beurier
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.turtlekit2.kernel.agents.Turtle
angle, angleCos, angleSin, color, East, hidden, initMethod, North, NorthEast, NorthWest, position, South, SouthEast, SouthWest, TURTLE_DEFAULT_ROLE, West, x, y
 
Constructor Summary
EmitMovingTurtle()
           
 
Method Summary
 String behavior()
          The turtle moves according to its speed and emits flavors each frequency steps with an amount equal to quantity
 void setup()
          Parse attributes and initialize the behavior of the turtle
 String toString()
          toSring method
 
Methods inherited from class edu.turtlekit2.kernel.agents.Turtle
activate, bk, countTurtlesAt, countTurtlesHere, createTurtle, defaultAction, die, distance, distanceNowrap, dropMark, dropMarkAt, dx, dy, emit, end, fd, getAttributes, getColor, getCurrentBehaviorCount, getDirectionOfMax, getDirectionOfMaxInMyDirection, getDirectionOfMin, getDirectionOfMinInMyDirection, getHeading, getHeadingToMaxOf, getHidden, getMark, getMarkAt, getPatchAt, getPatchColor, getPatchColorAt, getPatchWithMaxOf, getPerceptPatchVariable, getSimulationGroup, getTurtlesListWithRole, getTurtlesWithRole, getTurtleWithID, getWorldHeight, getWorldWidth, giveUpRole, home, incrementBehaviorCount, incrementPatchVariableAt, initialisation, isMarkPresent, isMarkPresentAt, isPlayingRole, moveTo, moveTo, mySelf, nextPatch, playRole, randomHeading, realX, realY, setAttributes, setColor, setHeading, setHidden, setNextAction, setPatchColor, setPatchColorAt, setX, setXY, setY, smell, smellAt, smellNextPatch, towards, towardsNowrap, turnLeft, turnRight, turtlesAt, turtlesHere, wiggle, xcor, ycor
 
Methods inherited from class madkit.kernel.AbstractAgent
broadcastMessage, broadcastMessage, connectedWithCommunity, createGroup, createGroup, debug, disposeMyGUI, foundGroup, getAddress, getAgentInformation, getAgentsWithRole, getAgentsWithRole, getAgentWithRole, getAgentWithRole, getAvailableCommunities, getBean, getController, getCurrentKernelAddress, getDebug, getExistingGroups, getExistingGroups, getExistingRoles, getExistingRoles, getGroups, getGUIObject, getMessageBoxSize, getMyGroups, getMyGroups, getMyRoles, getMyRoles, getName, getRoles, hasGUI, hashCode, 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

EmitMovingTurtle

public EmitMovingTurtle()
Method Detail

setup

public void setup()
Parse attributes and initialize the behavior of the turtle

Overrides:
setup in class Turtle

toString

public String toString()
toSring method

Overrides:
toString in class Turtle

behavior

public String behavior()
The turtle moves according to its speed and emits flavors each frequency steps with an amount equal to quantity