Patch

org.nlogo.api.Patch
trait Patch extends Agent

Provides access to NetLogo patches.

Attributes

Source
Patch.scala
Graph
Supertypes
trait Agent
class Object
trait Matchable
class Any
Known subtypes
trait Patch3D

Members list

Value members

Abstract methods

Returns the patch at dx and dy from this patch

Returns the patch at dx and dy from this patch

Value parameters

dx

the x offset from this patch

dy

the y offset from this patch

Attributes

Source
Patch.scala

Returns true if the label variable contains something other than an empty string.

Returns true if the label variable contains something other than an empty string.

Attributes

Source
Patch.scala
def labelColor: AnyRef

Returns the value of the label-color variable.

Returns the value of the label-color variable.

Attributes

Source
Patch.scala

Returns the value of the label variable.

Returns the value of the label variable.

Attributes

Source
Patch.scala
def pcolor: AnyRef

Returns the value of the pcolor variable.

Returns the value of the pcolor variable.

Attributes

Source
Patch.scala
def pxcor: Int

Returns the value of the pxcor variable.

Returns the value of the pxcor variable.

Attributes

Source
Patch.scala
def pycor: Int

Returns the value of the pycor variable.

Returns the value of the pycor variable.

Attributes

Source
Patch.scala
def shape: String

Returns the name of the current shape, empty string in the case of patches.

Returns the name of the current shape, empty string in the case of patches.

Attributes

Source
Patch.scala

Inherited and Abstract methods

def alpha: Int

0-255, 0 = invisible, 255 = opaque

0-255, 0 = invisible, 255 = opaque

Attributes

Inherited from:
Agent
Source
Agent.scala

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)

Attributes

Inherited from:
Agent
Source
Agent.scala
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

Value parameters

vn

the index into the agent variable array

Attributes

Inherited from:
Agent
Source
Agent.scala
def id: Long

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

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

Attributes

Inherited from:
Agent
Source
Agent.scala

Returns the kind of this agent (Turtle, Link, Patch, Observer).

Returns the kind of this agent (Turtle, Link, Patch, Observer).

Attributes

Inherited from:
Agent
Source
Agent.scala
def setVariable(vn: Int, value: AnyRef): 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

Value parameters

value

the new value for the variable

vn

the index into the agent variable array

Attributes

Throws
api.AgentException

If value is the wrong type for the given variable or if you try to change variables that cannot be changed

Inherited from:
Agent
Source
Agent.scala
def size: Double

Returns the size of this agent

Returns the size of this agent

Attributes

Inherited from:
Agent
Source
Agent.scala
def variables: Array[AnyRef]

Returns raw array of all agent variables. Warning: this method is liable to change return type in a future API version.

Returns raw array of all agent variables. Warning: this method is liable to change return type in a future API version.

Attributes

Inherited from:
Agent
Source
Agent.scala
def world: World

Returns the world object associated with this agent

Returns the world object associated with this agent

Attributes

Inherited from:
Agent
Source
Agent.scala