class Turtle2D extends Turtle
- Source
- Turtle2D.java
- Alphabetic
- By Inheritance
- Turtle2D
- Turtle
- AgentColors
- Turtle
- Agent
- Comparable
- Agent
- AgentJ
- 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
- Definition Classes
- Turtle
- def agentBit(): Int
-
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
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
color(rgb: LogoList, varIndex: Int): Unit
- Definition Classes
- Turtle
-
def
color(): AnyRef
Returns the value of the
color
variable, a Double or LogoList. -
def
colorDouble(boxedColor: Double): Unit
- Definition Classes
- Turtle
-
def
colorDoubleUnchecked(boxedColor: Double): Unit
- Definition Classes
- Turtle
-
def
compareTo(a: Agent): Int
- Definition Classes
- Agent → Comparable
-
def
die(): Unit
- Definition Classes
- Turtle
- 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(agent: Agent, wrap: Boolean): Unit
-
def
face(x: Double, y: Double, wrap: Boolean): Unit
- Definition Classes
- Turtle
-
def
getBreed(): TreeAgentSet
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
- Annotations
- @native() @IntrinsicCandidate()
- def getLinkBreedVariable(name: String): AnyRef
- def getLinkVariable(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
- Definition Classes
- Turtle
-
def
getVariable(name: String): AnyRef
- Definition Classes
- Turtle
-
def
getVariable(vn: Int): AnyRef
Returns the value of the variable in the given position of the agent variable array
-
def
hasLabel(): Boolean
Returns true if the
label
variable has a non-empty string value. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hatch(breed: TreeAgentSet): Turtle
-
def
hatch(): Turtle
- Definition Classes
- Turtle
-
def
heading(heading: Double): Unit
- Definition Classes
- Turtle
-
def
heading(heading: Double, seenTurtles: Set[Turtle]): Unit
- Definition Classes
- Turtle
-
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
- Definition Classes
- Turtle
-
def
hidden(): Boolean
Returns the value of the
hidden?
variable. - def home(): Unit
-
def
id: Long
Returns the id number of this agent.
-
def
id_=(newId: Long): Unit
- Definition Classes
- Agent
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLinkedTo(dest: Turtle, linkSet: AgentSet): Boolean
- Definition Classes
- Turtle
-
def
isLinkedWith(dest: Turtle, linkSet: AgentSet): Boolean
- Definition Classes
- Turtle
-
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 (Turtle, Link, Patch, Observer).
-
def
label(label: Any): Unit
- Definition Classes
- Turtle
-
def
label(): AnyRef
- Definition Classes
- Turtle
-
def
labelColor(rgb: LogoList, valueIndex: Int): Unit
- Definition Classes
- Turtle
-
def
labelColor(labelColor: Double): Unit
- Definition Classes
- Turtle
-
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]
- Definition Classes
- Turtle
-
def
moveTo(otherAgent: Agent): Unit
- Definition Classes
- Turtle
- def moveToPatchCenter(): Unit
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
def
ownsVariable(name: String): Boolean
- Definition Classes
- Turtle
-
def
penMode(penMode: String): Unit
- Definition Classes
- Turtle
-
def
penMode(): String
- Definition Classes
- Turtle
-
def
penSize(penSize: Double): Unit
- Definition Classes
- Turtle
-
def
penSize(): Double
- Definition Classes
- Turtle
- def realloc(oldProgram: Program, newProgram: Program): Agent
-
def
removeLink(link: Link): Boolean
- Definition Classes
- Turtle
-
def
selectLinks(out: Boolean, in: Boolean, linkSet: AgentSet): Array[Link]
- Definition Classes
- Turtle
-
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).
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).
- Definition Classes
- Turtle
- def setBreedVariable(name: String, value: Any): Unit
- def setId(id: Long): Unit
- def setLinkBreedVariable(name: String, value: Any): Unit
- def setLinkVariable(vn: Int, value: Double): Unit
- def setLinkVariable(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
- Annotations
- @Override()
- 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
setVariables(v: Array[AnyRef]): Unit
- Definition Classes
- Agent
-
def
shape(shape: String): Unit
- Definition Classes
- Turtle
-
def
shape(): String
Returns the name of the current shape
-
def
shortestPathX(x: Double): Double
- Definition Classes
- Turtle
-
def
shortestPathY(y: Double): Double
- Definition Classes
- Turtle
-
def
size(size: Double): Unit
- Definition Classes
- Turtle
-
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
- Annotations
- @Override()
- def turnRight(delta: Double): Unit
-
def
validRGBList(rgb: LogoList, allowAlpha: Boolean): Unit
- Definition Classes
- AgentColors
- Annotations
- @throws( classOf[AgentException] )
-
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.
-
def
variables_=(v: Array[AnyRef]): Unit
- Definition Classes
- Agent
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
world: World
Returns the world object associated with this agent
-
def
xandycor(xcor: Double, ycor: Double): Unit
- Definition Classes
- Turtle
-
def
xandycor(xcor: Double, ycor: Double, seenTurtles: Set[Turtle], isJump: Boolean): Unit
- Definition Classes
- Turtle
-
def
xandycor(xcor: Double, ycor: Double): Unit
- Definition Classes
- Turtle
-
def
xandycorHelper(xcor: Double, ycor: Double, seenTurtles: Set[Turtle], isJump: Boolean): Unit
- Definition Classes
- Turtle
-
def
xandycorHelper(xcor: Double, ycor: Double, isJump: Boolean): Unit
- Definition Classes
- Turtle
-
def
xcor(xcor: Double): Unit
- Definition Classes
- Turtle
-
def
xcor(xcor: Double): Unit
- Definition Classes
- Turtle
-
def
xcor(): Double
Returns the value of the
xcor
variable. -
def
ycor(ycor: Double): Unit
- Definition Classes
- Turtle
-
def
ycor(ycor: Double): Unit
- Definition Classes
- Turtle
-
def
ycor(): Double
Returns the value of the
ycor
variable.