c

org.nlogo.agent

Turtle

abstract class Turtle extends Agent with api.Turtle with AgentColors

Source
Turtle.java
Linear Supertypes
AgentColors, api.Turtle, Agent, Comparable[Agent], api.Agent, AgentJ, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Turtle
  2. AgentColors
  3. Turtle
  4. Agent
  5. Comparable
  6. Agent
  7. AgentJ
  8. AnyRef
  9. 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)

Abstract Value Members

  1. abstract def dx(): Double
  2. abstract def dy(): Double
  3. abstract def face(agent: Agent, wrap: Boolean): Unit
  4. abstract def getPatchAtHeadingAndDistance(delta: Double, distance: Double): Patch
  5. abstract def getPatchAtOffsets(dx: Double, dy: Double): Patch
    Definition Classes
    TurtleAgent
  6. abstract def getPatchHere(): Patch

    Returns the patch that this turtle is on.

    Returns the patch that this turtle is on.

    Definition Classes
    TurtleTurtle
  7. abstract def hatch(): Turtle
  8. abstract def home(): Unit
  9. abstract 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
  10. abstract def moveToPatchCenter(): Unit
  11. abstract def turnRight(delta: Double): Unit

Concrete 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 agentBit(): Int
    Definition Classes
    TurtleAgent
  6. def alpha(): Int

    0-255, 0 = invisible, 255 = opaque

    0-255, 0 = invisible, 255 = opaque

    Definition Classes
    TurtleAgent
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. 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
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. def color(rgb: LogoList, varIndex: Int): Unit
  11. 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
  12. def colorDouble(boxedColor: Double): Unit
  13. def colorDoubleUnchecked(boxedColor: Double): Unit
  14. def compareTo(a: Agent): Int
    Definition Classes
    Agent → Comparable
  15. def die(): Unit
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def face(x: Double, y: Double, wrap: Boolean): Unit
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def getBreed(): TreeAgentSet

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

    Returns the index of this turtle's breed.

    Returns the index of this turtle's breed.

    Definition Classes
    TurtleTurtle
  22. def getBreedVariable(name: String): AnyRef
    Definition Classes
    TurtleAgent
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def getLinkBreedVariable(name: String): AnyRef
    Definition Classes
    TurtleAgent
  25. def getLinkVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  26. def getPatchVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  27. def getTurtleOrLinkVariable(varName: String): AnyRef
    Definition Classes
    TurtleAgent
  28. def getTurtleVariable(vn: Int): AnyRef
    Definition Classes
    TurtleAgent
  29. def getTurtleVariableDouble(vn: Int): Double
  30. def getVariable(name: String): AnyRef
  31. 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
  32. 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
  33. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. def hatch(breed: TreeAgentSet): Turtle
  35. def heading(heading: Double): Unit
  36. def heading(heading: Double, seenTurtles: Set[Turtle]): Unit
  37. def heading(heading: Double): Unit

    Sets the value of the heading variable

    Sets the value of the heading variable

    Definition Classes
    TurtleTurtle
  38. def heading(): Double

    Returns the value of the heading variable.

    Returns the value of the heading variable.

    Definition Classes
    TurtleTurtle
  39. def hidden(hidden: Boolean): Unit
  40. def hidden(): Boolean

    Returns the value of the hidden? variable.

    Returns the value of the hidden? variable.

    Definition Classes
    TurtleTurtle
  41. 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
  42. def id_=(newId: Long): Unit
    Definition Classes
    Agent
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. 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
  45. def label(label: Any): Unit
  46. def label(): AnyRef
  47. def labelColor(rgb: LogoList, valueIndex: Int): Unit
  48. def labelColor(labelColor: Double): Unit
  49. def labelColor(): AnyRef

    Returns the value of the label-color variable.

    Returns the value of the label-color variable.

    Definition Classes
    TurtleTurtle
  50. def labelString(): String

    Returns the value of the label variable.

    Returns the value of the label variable.

    Definition Classes
    TurtleTurtle
  51. def lineThickness(): Double

    Returns the line-thickness.

    Returns the line-thickness.

    Definition Classes
    TurtleTurtle
  52. def links(): Array[Link]
  53. def moveTo(otherAgent: Agent): Unit
  54. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  55. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  56. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  57. def ownsVariable(name: String): Boolean
  58. def penMode(penMode: String): Unit
  59. def penMode(): String
  60. def penSize(penSize: Double): Unit
  61. def penSize(): Double
  62. def realloc(oldProgram: Program, newProgram: Program): Agent
    Definition Classes
    TurtleAgent
  63. def removeLink(link: Link): Boolean
  64. def selectLinks(out: Boolean, in: Boolean, linkSet: AgentSet): Array[Link]
  65. 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).

  66. def setBreedVariable(name: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  67. def setId(id: Long): Unit
    Definition Classes
    TurtleAgent
  68. def setLinkBreedVariable(name: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  69. def setLinkVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  70. def setLinkVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  71. def setPatchVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  72. def setPatchVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  73. def setTurtleOrLinkVariable(varName: String, value: Any): Unit
    Definition Classes
    TurtleAgent
  74. def setTurtleVariable(vn: Int, value: Any): Unit
    Definition Classes
    TurtleAgent
  75. def setTurtleVariable(vn: Int, value: Double): Unit
    Definition Classes
    TurtleAgent
  76. 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

  77. def setVariables(v: Array[AnyRef]): Unit
    Definition Classes
    Agent
  78. def shape(shape: String): Unit
  79. def shape(): String

    Returns the name of the current shape

    Returns the name of the current shape

    Definition Classes
    TurtleTurtleAgent
  80. def shortestPathX(x: Double): Double
  81. def shortestPathY(y: Double): Double
  82. def size(size: Double): Unit
  83. def size(): Double

    Returns the size of this agent

    Returns the size of this agent

    Definition Classes
    TurtleAgent
  84. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  85. def toString(): String
    Definition Classes
    Turtle → AnyRef → Any
  86. def validRGBList(rgb: LogoList, allowAlpha: Boolean): Unit
    Definition Classes
    AgentColors
    Annotations
    @throws( classOf[AgentException] )
  87. 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.

    vn

    the index of the variable

    Definition Classes
    TurtleAgent
  88. 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
  89. def variables_=(v: Array[AnyRef]): Unit
    Definition Classes
    Agent
  90. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  91. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  92. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  93. def world: World

    Returns the world object associated with this agent

    Returns the world object associated with this agent

    Definition Classes
    AgentAgent
  94. def xandycor(xcor: Double, ycor: Double): Unit
  95. def xandycor(xcor: Double, ycor: Double, seenTurtles: Set[Turtle], isJump: Boolean): Unit
  96. def xandycor(xcor: Double, ycor: Double): Unit
  97. def xandycorHelper(xcor: Double, ycor: Double, seenTurtles: Set[Turtle], isJump: Boolean): Unit
  98. def xandycorHelper(xcor: Double, ycor: Double, isJump: Boolean): Unit
  99. def xcor(xcor: Double): Unit
  100. def xcor(xcor: Double): Unit
  101. def xcor(): Double

    Returns the value of the xcor variable.

    Returns the value of the xcor variable.

    Definition Classes
    TurtleTurtle
  102. def ycor(ycor: Double): Unit
  103. def ycor(ycor: Double): Unit
  104. def ycor(): Double

    Returns the value of the ycor variable.

    Returns the value of the ycor variable.

    Definition Classes
    TurtleTurtle

Inherited from AgentColors

Inherited from api.Turtle

Inherited from Agent

Inherited from Comparable[Agent]

Inherited from api.Agent

Inherited from AgentJ

Inherited from AnyRef

Inherited from Any

Ungrouped