org.nlogo.api
Interface Turtle

All Superinterfaces:
Agent
All Known Subinterfaces:
Turtle3D, TurtleStamp3D
All Known Implementing Classes:
Turtle, Turtle3D, TurtleStamp3D

public interface Turtle
extends Agent

Interface provides access to NetLogo turtles.


Method Summary
 Shape cachedShape()
           
 void cachedShape(Shape shape)
           
 Object color()
          Returns the value of the color variable
 AgentSet getBreed()
          Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded
 int getBreedIndex()
          Returns the index of this turtle's breed
 Patch getPatchHere()
          Returns the patch that this turtle is on
 boolean hasLabel()
          Returns true if the label variable has a non-empty string value
 double heading()
          Returns the value of the heading variable
 void heading(double d)
          Sets the value of the heading variable
 boolean hidden()
          Returns the value of the hidden?
 void jump(double distance)
          Moves the turtle forward distance as if the command jump were used
 Object labelColor()
          Returns the value of the label-color variable
 String labelString()
          Returns the value of the label variable
 double lineThickness()
          Returns the line-thickness
 double xcor()
          Returns the value of the xcor variable
 double ycor()
          Returns the value of the ycor variable
 
Methods inherited from interface org.nlogo.api.Agent
classDisplayName, getVariable, id, setVariable, shape, size, world
 

Method Detail

xcor

double xcor()
Returns the value of the xcor variable


ycor

double ycor()
Returns the value of the ycor variable


cachedShape

Shape cachedShape()

cachedShape

void cachedShape(Shape shape)

heading

double heading()
Returns the value of the heading variable


heading

void heading(double d)
Sets the value of the heading variable

Parameters:
d - the new heading

hidden

boolean hidden()
Returns the value of the hidden? variable


lineThickness

double lineThickness()
Returns the line-thickness


hasLabel

boolean hasLabel()
Returns true if the label variable has a non-empty string value


color

Object color()
Returns the value of the color variable


labelString

String labelString()
Returns the value of the label variable


labelColor

Object labelColor()
Returns the value of the label-color variable


getBreed

AgentSet getBreed()
Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded


getBreedIndex

int getBreedIndex()
Returns the index of this turtle's breed


getPatchHere

Patch getPatchHere()
Returns the patch that this turtle is on


jump

void jump(double distance)
          throws AgentException
Moves the turtle forward distance as if the command jump were used

Parameters:
distance - this amount to jump
Throws:
AgentException