Class

org.nlogo.agent

Turtle

Related Doc: package agent

Permalink

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)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addObserver(arg0: java.util.Observer): Unit

    Permalink
    Definition Classes
    Observable
  5. def alpha(): Int

    Permalink

    0-255, 0 = invisible, 255 = opaque

    0-255, 0 = invisible, 255 = opaque

    Definition Classes
    TurtleAgent
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def classDisplayName(): String

    Permalink

    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
  8. def clearChanged(): Unit

    Permalink
    Attributes
    protected[java.util]
    Definition Classes
    Observable
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def color(rgb: LogoList, varIndex: Int): Unit

    Permalink
  11. def color(): AnyRef

    Permalink

    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
  12. def colorDouble(boxedColor: Double): Unit

    Permalink
  13. def colorDoubleUnchecked(boxedColor: Double): Unit

    Permalink
  14. def compareTo(a: Agent): Int

    Permalink
    Definition Classes
    Agent → Comparable
  15. def countObservers(): Int

    Permalink
    Definition Classes
    Observable
  16. def deleteObserver(arg0: java.util.Observer): Unit

    Permalink
    Definition Classes
    Observable
  17. def deleteObservers(): Unit

    Permalink
    Definition Classes
    Observable
  18. def die(): Unit

    Permalink
  19. def dx(): Double

    Permalink
  20. def dy(): Double

    Permalink
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  23. def face(x: Double, y: Double, wrap: Boolean): Unit

    Permalink
  24. def face(agent: Agent, wrap: Boolean): Unit

    Permalink
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def getAgentBit(): Int

    Permalink
    Definition Classes
    TurtleAgent
  27. def getAgentClass(): Class[Turtle]

    Permalink
    Definition Classes
    TurtleAgent
  28. def getBreed(): AgentSet

    Permalink

    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
  29. def getBreedIndex(): Int

    Permalink

    Returns the index of this turtle's breed.

    Returns the index of this turtle's breed.

    Definition Classes
    TurtleTurtle
  30. def getBreedVariable(name: String): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  31. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  32. def getLinkBreedVariable(name: String): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  33. def getLinkVariable(vn: Int): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  34. def getObserverVariable(vn: Int): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  35. def getPatchAtHeadingAndDistance(delta: Double, distance: Double): Patch

    Permalink
  36. def getPatchAtOffsets(dx: Double, dy: Double): Patch

    Permalink
    Definition Classes
    TurtleAgent
  37. def getPatchHere(): Patch

    Permalink

    Returns the patch that this turtle is on.

    Returns the patch that this turtle is on.

    Definition Classes
    TurtleTurtle
  38. def getPatchVariable(vn: Int): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  39. def getTurtleOrLinkVariable(varName: String): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  40. def getTurtleVariable(vn: Int): AnyRef

    Permalink
    Definition Classes
    TurtleAgent
  41. def getTurtleVariableDouble(vn: Int): Double

    Permalink
  42. def getVariable(name: String): AnyRef

    Permalink
  43. def getVariable(vn: Int): AnyRef

    Permalink

    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
  44. def getVariableCount(): Int

    Permalink
    Definition Classes
    Agent
  45. def hasChanged(): Boolean

    Permalink
    Definition Classes
    Observable
  46. def hasLabel(): Boolean

    Permalink

    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
  47. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  48. def hatch(): Turtle

    Permalink
  49. def heading(heading: Double): Unit

    Permalink
  50. def heading(heading: Double, seenTurtles: Set[Turtle]): Unit

    Permalink
  51. def heading(heading: Double): Unit

    Permalink

    Sets the value of the heading variable

    Sets the value of the heading variable

    Definition Classes
    TurtleTurtle
  52. def heading(): Double

    Permalink

    Returns the value of the heading variable.

    Returns the value of the heading variable.

    Definition Classes
    TurtleTurtle
  53. def hidden(hidden: Boolean): Unit

    Permalink
  54. def hidden(): Boolean

    Permalink

    Returns the value of the hidden? variable.

    Returns the value of the hidden? variable.

    Definition Classes
    TurtleTurtle
  55. def home(): Unit

    Permalink
  56. def id(): Long

    Permalink

    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
  57. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  58. def isPartiallyTransparent(): Boolean

    Permalink
    Definition Classes
    Agent
  59. def jump(distance: Double): Unit

    Permalink

    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
  60. def kind(): AgentKind

    Permalink

    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
  61. def label(label: Any): Unit

    Permalink
  62. def label(): AnyRef

    Permalink
  63. def labelColor(rgb: LogoList, valueIndex: Int): Unit

    Permalink
  64. def labelColor(labelColor: Double): Unit

    Permalink
  65. def labelColor(): AnyRef

    Permalink

    Returns the value of the label-color variable.

    Returns the value of the label-color variable.

    Definition Classes
    TurtleTurtle
  66. def labelString(): String

    Permalink

    Returns the value of the label variable.

    Returns the value of the label variable.

    Definition Classes
    TurtleTurtle
  67. def lineThickness(): Double

    Permalink

    Returns the line-thickness.

    Returns the line-thickness.

    Definition Classes
    TurtleTurtle
  68. def moveTo(otherAgent: Agent): Unit

    Permalink
  69. def moveToPatchCenter(): Unit

    Permalink
  70. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  71. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  72. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  73. def notifyObservers(arg0: Any): Unit

    Permalink
    Definition Classes
    Observable
  74. def notifyObservers(): Unit

    Permalink
    Definition Classes
    Observable
  75. def ownsVariable(name: String): Boolean

    Permalink
  76. def penMode(penMode: String): Unit

    Permalink
  77. def penMode(): String

    Permalink
  78. def penSize(penSize: Double): Unit

    Permalink
  79. def penSize(): Double

    Permalink
  80. def setBreed(breed: AgentSet): Unit

    Permalink
  81. def setBreedVariable(name: String, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  82. def setChanged(): Unit

    Permalink
    Attributes
    protected[java.util]
    Definition Classes
    Observable
  83. def setLinkBreedVariable(name: String, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  84. def setLinkVariable(vn: Int, value: Double): Unit

    Permalink
    Definition Classes
    TurtleAgent
  85. def setLinkVariable(vn: Int, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  86. def setObserverVariable(vn: Int, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  87. def setPatchVariable(vn: Int, value: Double): Unit

    Permalink
    Definition Classes
    TurtleAgent
  88. def setPatchVariable(vn: Int, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  89. def setTurtleOrLinkVariable(varName: String, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  90. def setTurtleVariable(vn: Int, value: Any): Unit

    Permalink
    Definition Classes
    TurtleAgent
  91. def setTurtleVariable(vn: Int, value: Double): Unit

    Permalink
    Definition Classes
    TurtleAgent
  92. def setVariable(vn: Int, value: Any): Unit

    Permalink

    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

  93. def shape(shape: String): Unit

    Permalink
  94. def shape(): String

    Permalink

    Returns the name of the current shape

    Returns the name of the current shape

    Definition Classes
    TurtleTurtleAgent
  95. def shortestPathX(x: Double): Double

    Permalink
  96. def shortestPathY(y: Double): Double

    Permalink
  97. def size(size: Double): Unit

    Permalink
  98. def size(): Double

    Permalink

    Returns the size of this agent

    Returns the size of this agent

    Definition Classes
    TurtleAgent
  99. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  100. def toString(): String

    Permalink
    Definition Classes
    Turtle → AnyRef → Any
  101. def turnRight(delta: Double): Unit

    Permalink
  102. def variableConstraint(vn: Int, con: ValueConstraint): Unit

    Permalink
    Definition Classes
    Agent
  103. def variableConstraint(vn: Int): ValueConstraint

    Permalink
    Definition Classes
    Agent
  104. def variableName(vn: Int): String

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

    Permalink

    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
  106. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. def world(): World

    Permalink

    Returns the world object associated with this agent

    Returns the world object associated with this agent

    Definition Classes
    AgentAgent
  110. def xandycor(xcor: Double, ycor: Double): Unit

    Permalink
  111. def xandycor(xcor: Double, ycor: Double, seenTurtles: Set[Turtle]): Unit

    Permalink
  112. def xandycor(xcor: Double, ycor: Double): Unit

    Permalink
  113. def xandycorHelper(xcor: Double, ycor: Double): Unit

    Permalink
  114. def xcor(xcor: Double): Unit

    Permalink
  115. def xcor(xcor: Double): Unit

    Permalink
  116. def xcor(): Double

    Permalink

    Returns the value of the xcor variable.

    Returns the value of the xcor variable.

    Definition Classes
    TurtleTurtle
  117. def ycor(ycor: Double): Unit

    Permalink
  118. def ycor(ycor: Double): Unit

    Permalink
  119. def ycor(): Double

    Permalink

    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