class Turtle extends Agent with api.Turtle
- Alphabetic
- By Inheritance
- Turtle
- Turtle
- Agent
- Comparable
- Agent
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addLink(link: Link): Unit
-
def
addObserver(arg0: java.util.Observer): Unit
- Definition Classes
- Observable
-
def
alpha(): Int
0-255, 0 = invisible, 255 = opaque
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
classDisplayName(): String
Returns a displayable name of this type of agent (Turtle, Link, Patch, Observer)
-
def
clearChanged(): Unit
- Attributes
- protected[java.util]
- Definition Classes
- Observable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def color(rgb: LogoList, varIndex: Int): Unit
-
def
color(): AnyRef
Returns the value of the
color
variable, a Double or LogoList. - def colorDouble(boxedColor: Double): Unit
- def colorDoubleUnchecked(boxedColor: Double): Unit
-
def
compareTo(a: Agent): Int
- Definition Classes
- Agent → Comparable
-
def
countObservers(): Int
- Definition Classes
- Observable
-
def
deleteObserver(arg0: java.util.Observer): Unit
- Definition Classes
- Observable
-
def
deleteObservers(): Unit
- Definition Classes
- Observable
- def die(): Unit
- def dx(): Double
- def dy(): Double
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def face(x: Double, y: Double, wrap: Boolean): Unit
- def face(agent: Agent, wrap: Boolean): Unit
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def getAgentBit(): Int
- def getAgentClass(): Class[Turtle]
-
def
getBreed(): AgentSet
Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded.
-
def
getBreedIndex(): Int
Returns the index of this turtle's breed.
- def getBreedVariable(name: String): AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def getLinkBreedVariable(name: String): AnyRef
- def getLinkVariable(vn: Int): AnyRef
- def getObserverVariable(vn: Int): AnyRef
- def getPatchAtHeadingAndDistance(delta: Double, distance: Double): Patch
- def getPatchAtOffsets(dx: Double, dy: Double): Patch
-
def
getPatchHere(): Patch
Returns the patch that this turtle is on.
- def getPatchVariable(vn: Int): AnyRef
- def getTurtleOrLinkVariable(varName: String): AnyRef
- def getTurtleVariable(vn: Int): AnyRef
- def getTurtleVariableDouble(vn: Int): Double
- def getVariable(name: String): AnyRef
-
def
getVariable(vn: Int): AnyRef
Returns the value of the variable in the given position of the agent variable array
-
def
getVariableCount(): Int
- Definition Classes
- Agent
-
def
hasChanged(): Boolean
- Definition Classes
- Observable
-
def
hasLabel(): Boolean
Returns true if the
label
variable has a non-empty string value. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def hatch(breed: AgentSet): Turtle
- def hatch(): Turtle
- def heading(heading: Double): Unit
- def heading(heading: Double, seenTurtles: Set[Turtle]): Unit
-
def
heading(heading: Double): Unit
Sets the value of the
heading
variable -
def
heading(): Double
Returns the value of the
heading
variable. - def hidden(hidden: Boolean): Unit
-
def
hidden(): Boolean
Returns the value of the
hidden?
variable. - def home(): Unit
-
def
id(): Long
Returns the id number of this agent.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPartiallyTransparent(): Boolean
- Definition Classes
- Agent
-
def
jump(distance: Double): Unit
Moves the turtle forward distance as if the command
jump
were used -
def
kind(): AgentKind
Returns the kind of this agent (observer, turtle, patch, or link.
- def label(label: Any): Unit
- def label(): AnyRef
- def labelColor(rgb: LogoList, valueIndex: Int): Unit
- def labelColor(labelColor: Double): Unit
-
def
labelColor(): AnyRef
Returns the value of the
label-color
variable. -
def
labelString(): String
Returns the value of the
label
variable. -
def
lineThickness(): Double
Returns the
line-thickness
. - def links(): Array[Link]
- def moveTo(otherAgent: Agent): Unit
- def moveToPatchCenter(): Unit
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
notifyObservers(arg0: Any): Unit
- Definition Classes
- Observable
-
def
notifyObservers(): Unit
- Definition Classes
- Observable
- def ownsVariable(name: String): Boolean
- def penMode(penMode: String): Unit
- def penMode(): String
- def penSize(penSize: Double): Unit
- def penSize(): Double
- def removeLink(link: Link): Boolean
- def selectLinks(out: Boolean, in: Boolean, breed: AgentSet): Array[Link]
-
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).
- def setBreedVariable(name: String, value: Any): Unit
-
def
setChanged(): Unit
- Attributes
- protected[java.util]
- Definition Classes
- Observable
- def setLinkBreedVariable(name: String, value: Any): Unit
- def setLinkVariable(vn: Int, value: Double): Unit
- def setLinkVariable(vn: Int, value: Any): Unit
- def setObserverVariable(vn: Int, value: Any): Unit
- def setPatchVariable(vn: Int, value: Double): Unit
- def setPatchVariable(vn: Int, value: Any): Unit
- def setTurtleOrLinkVariable(varName: String, value: Any): Unit
- def setTurtleVariable(vn: Int, value: Any): Unit
- def setTurtleVariable(vn: Int, value: Double): Unit
-
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
- Turtle → Agent → Agent
- 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
- def shape(shape: String): Unit
-
def
shape(): String
Returns the name of the current shape
- def shortestPathX(x: Double): Double
- def shortestPathY(y: Double): Double
- def size(size: Double): Unit
-
def
size(): Double
Returns the size of this agent
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Turtle → AnyRef → Any
- def turnRight(delta: Double): Unit
-
def
variableConstraint(vn: Int, con: ValueConstraint): Unit
- Definition Classes
- Agent
-
def
variableConstraint(vn: Int): ValueConstraint
- Definition Classes
- Agent
-
def
variableName(vn: Int): String
Returns the name of the variable with the given index.
-
def
variables(): Array[AnyRef]
Returns raw array of all agent variables.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
world(): World
Returns the world object associated with this agent
- def xandycor(xcor: Double, ycor: Double): Unit
- def xandycor(xcor: Double, ycor: Double, seenTurtles: Set[Turtle]): Unit
- def xandycor(xcor: Double, ycor: Double): Unit
- def xandycorHelper(xcor: Double, ycor: Double): Unit
- def xcor(xcor: Double): Unit
- def xcor(xcor: Double): Unit
-
def
xcor(): Double
Returns the value of the
xcor
variable. - def ycor(ycor: Double): Unit
- def ycor(ycor: Double): Unit
-
def
ycor(): Double
Returns the value of the
ycor
variable.