-
-
Notifications
You must be signed in to change notification settings - Fork 237
/
Turtle.scala
61 lines (44 loc) · 1.56 KB
/
Turtle.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// (C) Uri Wilensky. https://github.com/NetLogo/NetLogo
package org.nlogo.api
/**
* Interface provides access to NetLogo turtles.
*/
trait Turtle extends Agent {
/** Returns the value of the <code>xcor</code> variable. */
def xcor: Double
/** Returns the value of the <code>ycor</code> variable. */
def ycor: Double
/** Returns the value of the <code>heading</code> variable. */
def heading: Double
/**
* Sets the value of the <code>heading</code> variable
*
* @param d the new heading
*/
def heading(d: Double)
/** Returns the value of the <code>hidden?</code> variable. */
def hidden: Boolean
/** Returns the <code>line-thickness</code>. */
def lineThickness: Double
/** Returns true if the <code>label</code> variable has a non-empty string value. */
def hasLabel: Boolean
/** Returns the value of the <code>color</code> variable, a Double or LogoList. */
def color: AnyRef
/** Returns the value of the <code>label</code> variable. */
def labelString: String
/** Returns the value of the <code>label-color</code> variable. */
def labelColor: AnyRef
/** Returns the breed AgentSet of this turtle, all turtles if the turtle is unbreeded. */
def getBreed: AgentSet
/** Returns the index of this turtle's breed. */
def getBreedIndex: Int
/** Returns the patch that this turtle is on. */
def getPatchHere: Patch
/**
* Moves the turtle forward distance as if the command <code>jump</code> were used
*
* @param distance this amount to jump
*/
@throws(classOf[AgentException])
def jump(distance: Double)
}