Turtle

Undocumented in source.

Members

Aliases

Color
alias Color = ViewColor!View
Undocumented in source.

Functions

forward
void forward(float distance)

Move the turtle forward by the given number of units. If the pen is down, draw a line with the configured color.

penDown
void penDown()
Undocumented in source. Be warned that the author may not have intended to support it.
penUp
void penUp()

Put the pen up or down.

turnAround
void turnAround()
Undocumented in source. Be warned that the author may not have intended to support it.
turnLeft
void turnLeft(float deg)

Change the turtle orientation by the given number of degrees.

turnRight
void turnRight(float deg)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

color
Color color;

Current turtle color.

orientation
float orientation;

Current turtle orientation (in degrees). Initially, the turtle is facing upwards.

penActive
bool penActive;

Is the pen currently down?

scale
float scale;

How many pixels is one unit (as used by forward).

view
View view;

View to draw on. This will usually be a reference.

x
float x;
y
float y;

Current turtle coordinates.

Meta