public static class TurtleDraw.Forward extends TurtleDraw.Move
Constructor and Description |
---|
Forward(float drawLength)
Creates a new draw forward command.
|
Modifier and Type | Method and Description |
---|---|
TurtleState |
draw(processing.core.PApplet parent,
TurtleState state)
Draws the current command and returns an updated turtle state.
|
call, draw, setTurtle
draw, setParent
public Forward(float drawLength)
drawLength
- the amount to draw forwardpublic TurtleState draw(processing.core.PApplet parent, TurtleState state)
TurtleDrawCommand
draw
in class TurtleDraw.Move
parent
- the PApplet to draw tostate
- the current state of the turtle (position/heading and stack)Processing Library loom by Cora Johnson-Roberson. (c) 2014-2016