c

org.nlogo.agent

Turtle

class Turtle extends Agent with api.Turtle

Source
Turtle.java
Linear Supertypes
api.Turtle, Agent, Comparable[Agent], api.Agent, Observable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Turtle
  2. Turtle
  3. Agent
  4. Comparable
  5. Agent
  6. Observable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Turtle(world: World, breed: AgentSet, xcor: Double, ycor: Double)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addLink(link: Link): Unit
  5. def addObserver(arg0: java.util.Observer): Unit
    Definition Classes
    Observable
  6. def agentBit(): Int
    Definition Classes
    Agent
  7. def alpha(): Int

    0-255, 0 = invisible, 255 = opaque

    0-255, 0 = invisible, 255 = opaque

    Definition Classes
    TurtleAgent
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def classDisplayName(): String

    Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer)

    Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer)

    Definition Classes
    TurtleAgentAgent
  10. def clearChanged(): Unit
    Attributes
    protected[java.util]
    Definition Classes
    Observable
  11. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def color(rgb: LogoList, varIndex: Int): Unit
  13. def color(): AnyRef

    Returns the value of the color variable, a Double or LogoList.

    Returns the value of the color variable, a Double or LogoList.

    Definition Classes
    TurtleTurtle
  14. def colorDouble(boxedColor: Double): Unit
  15. def colorDoubleUnchecked(boxedColor: Double): Unit
  16. def compareTo(a: Agent): Int
    Definition Classes
    Agent → Comparable
  17. def countObservers(): Int
    Definition Classes
    Observable
  18. def deleteObserver(arg0: java.util.Observer): Unit
    Definition Classes
    Observable
  19. def deleteObservers(): Unit
    Definition Classes
    Observable
  20. def die(): Unit
  21. def dx(): Double
  22. def dy(): Double
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  25. def face(x: Double, y: Double, wrap: Boolean): Unit
  26. def face(agent: Agent, wrap: Boolean): Unit
  27. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def getAgentBit(): Int
    Definition Classes
    TurtleAgent
  29. def getAgentClass(): Class[Turtle]
    Definition Classes
    TurtleAgent
  30. def getBreed(): AgentSet

    Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded.

    Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded.

    Definition Classes
    TurtleTurtle
  31. def getBreedIndex(): Int

    Returns the index of this turtle's breed.

    Returns the index of this turtle's breed.

    Definition Classes
    TurtleTurtle
  32. def getBreedVariable(name: String): AnyRef
    Definition Classes
    TurtleAgent
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  34. def getLinkBreedVariable(name: String): AnyRef
    Definition Classes
    TurtleAgent
  35. def getLinkVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  36. def getObserverVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  37. def getPatchAtHeadingAndDistance(delta: Double, distance: Double): Patch
  38. def getPatchAtOffsets(dx: Double, dy: Double): Patch
    Definition Classes
    TurtleAgent
  39. def getPatchHere(): Patch

    Returns the patch that this turtle is on.

    Returns the patch that this turtle is on.

    Definition Classes
    TurtleTurtle
  40. def getPatchVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  41. def getTurtleOrLinkVariable(varName: String): AnyRef
    Definition Classes
    TurtleAgent
  42. def getTurtleVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  43. def getTurtleVariableDouble(vn: Int): Double
  44. def getVariable(name: String): AnyRef
  45. def getVariable(vn: Int): AnyRef

    Returns the value of the variable in the given position of the agent variable array

    Returns the value of the variable in the given position of the agent variable array

    vn

    the index into the agent variable array

    Definition Classes
    TurtleAgentAgent
  46. def getVariableCount(): Int
    Definition Classes
    Agent
  47. def hasChanged(): Boolean
    Definition Classes
    Observable
  48. def hasLabel(): Boolean

    Returns true if the label variable has a non-empty string value.

    Returns true if the label variable has a non-empty string value.

    Definition Classes
    TurtleTurtle
  49. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  50. def hatch(breed: AgentSet): Turtle
  51. def hatch(): Turtle
  52. def heading(heading: Double): Unit
  53. def heading(heading: Double, seenTurtles: Set[Turtle]): Unit
  54. def heading(heading: Double): Unit

    Sets the value of the heading variable

    Sets the value of the heading variable

    Definition Classes
    TurtleTurtle
  55. def heading(): Double

    Returns the value of the heading variable.

    Returns the value of the heading variable.

    Definition Classes
    TurtleTurtle
  56. def hidden(hidden: Boolean): Unit
  57. def hidden(): Boolean

    Returns the value of the hidden? variable.

    Returns the value of the hidden? variable.

    Definition Classes
    TurtleTurtle
  58. def home(): Unit
  59. def id(): Long

    Returns the id number of this agent.

    Returns the id number of this agent. The who number in the case of a turtle, index into the array in the case of patches

    Definition Classes
    AgentAgent
  60. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  61. def isPartiallyTransparent(): Boolean
    Definition Classes
    Agent
  62. def jump(distance: Double): Unit

    Moves the turtle forward distance as if the command jump were used

    Moves the turtle forward distance as if the command jump were used

    distance

    this amount to jump

    Definition Classes
    TurtleTurtle
  63. def kind(): AgentKind

    Returns the kind of this agent (observer, turtle, patch, or link.

    Returns the kind of this agent (observer, turtle, patch, or link.

    Definition Classes
    TurtleAgent
  64. def label(label: Any): Unit
  65. def label(): AnyRef
  66. def labelColor(rgb: LogoList, valueIndex: Int): Unit
  67. def labelColor(labelColor: Double): Unit
  68. def labelColor(): AnyRef

    Returns the value of the label-color variable.

    Returns the value of the label-color variable.

    Definition Classes
    TurtleTurtle
  69. def labelString(): String

    Returns the value of the label variable.

    Returns the value of the label variable.

    Definition Classes
    TurtleTurtle
  70. def lineThickness(): Double

    Returns the line-thickness.

    Returns the line-thickness.

    Definition Classes
    TurtleTurtle
  71. def links(): Array[Link]
  72. def moveTo(otherAgent: Agent): Unit
  73. def moveToPatchCenter(): Unit
  74. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  75. final def notify(): Unit
    Definition Classes
    AnyRef
  76. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  77. def notifyObservers(arg0: Any): Unit
    Definition Classes
    Observable
  78. def notifyObservers(): Unit
    Definition Classes
    Observable
  79. def ownsVariable(name: String): Boolean
  80. def penMode(penMode: String): Unit
  81. def penMode(): String
  82. def penSize(penSize: Double): Unit
  83. def penSize(): Double
  84. def removeLink(link: Link): Boolean
  85. def selectLinks(out: Boolean, in: Boolean, linkSet: AgentSet): Array[Link]
  86. def setBreed(breed: AgentSet): Unit

    This version of setBreed properly resets the global breed AgentSets Caller should ensure that the turtle isn't a link (links aren't allowed to change breed).

  87. def setBreedVariable(name: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  88. def setChanged(): Unit
    Attributes
    protected[java.util]
    Definition Classes
    Observable
  89. def setLinkBreedVariable(name: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  90. def setLinkVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  91. def setLinkVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  92. def setObserverVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  93. def setPatchVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  94. def setPatchVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  95. def setTurtleOrLinkVariable(varName: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  96. def setTurtleVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  97. def setTurtleVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  98. def setVariable(vn: Int, value: Any): Unit

    Sets the variable in the position vn of the agent variable array to value

    Sets the variable in the position vn of the agent variable array to value

    vn

    the index into the agent variable array

    value

    the new value for the variable

    Definition Classes
    TurtleAgentAgent
    Exceptions thrown

    api.AgentException If value is the wrong type for the given variable or if you try to change variables that cannot be changed

  99. def shape(shape: String): Unit
  100. def shape(): String

    Returns the name of the current shape

    Returns the name of the current shape

    Definition Classes
    TurtleTurtleAgent
  101. def shortestPathX(x: Double): Double
  102. def shortestPathY(y: Double): Double
  103. def size(size: Double): Unit
  104. def size(): Double

    Returns the size of this agent

    Returns the size of this agent

    Definition Classes
    TurtleAgent
  105. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  106. def toString(): String
    Definition Classes
    Turtle → AnyRef → Any
  107. def turnRight(delta: Double): Unit
  108. def variableConstraint(vn: Int, con: ValueConstraint): Unit
    Definition Classes
    Agent
  109. def variableConstraint(vn: Int): ValueConstraint
    Definition Classes
    Agent
  110. def variableName(vn: Int): String

    Returns the name of the variable with the given index.

    Returns the name of the variable with the given index. Works for built-in, *-own, and breed variables. Only added in NetLogo 5.0.6.

    vn

    the index of the variable

    Definition Classes
    TurtleAgent
  111. def variables(): Array[AnyRef]

    Returns raw array of all agent variables.

    Returns raw array of all agent variables. Warning: this method is liable to change return type in a future API version.

    Definition Classes
    AgentAgent
  112. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  115. def world(): World

    Returns the world object associated with this agent

    Returns the world object associated with this agent

    Definition Classes
    AgentAgent
  116. def xandycor(xcor: Double, ycor: Double): Unit
  117. def xandycor(xcor: Double, ycor: Double, seenTurtles: Set[Turtle]): Unit
  118. def xandycor(xcor: Double, ycor: Double): Unit
  119. def xandycorHelper(xcor: Double, ycor: Double): Unit
  120. def xcor(xcor: Double): Unit
  121. def xcor(xcor: Double): Unit
  122. def xcor(): Double

    Returns the value of the xcor variable.

    Returns the value of the xcor variable.

    Definition Classes
    TurtleTurtle
  123. def ycor(ycor: Double): Unit
  124. def ycor(ycor: Double): Unit
  125. def ycor(): Double

    Returns the value of the ycor variable.

    Returns the value of the ycor variable.

    Definition Classes
    TurtleTurtle

Inherited from api.Turtle

Inherited from Agent

Inherited from Comparable[Agent]

Inherited from api.Agent

Inherited from Observable

Inherited from AnyRef

Inherited from Any

Ungrouped