public abstract class TurtleDrawCommand extends DrawCommand implements Callable<Void>
Turtle
's drawing commands. The
call
method serves to add this command to the turtle's list, and
allows these commands to be called by the scheduler through a common
interface.Constructor and Description |
---|
TurtleDrawCommand() |
Modifier and Type | Method and Description |
---|---|
Void |
call() |
void |
draw(processing.core.PApplet parent)
Does the actual drawing of the shape/line/etc.
|
TurtleState |
draw(processing.core.PApplet parent,
TurtleState state)
Draws the current command and returns an updated turtle state.
|
void |
setTurtle(Turtle turtle) |
draw, setParent
public void setTurtle(Turtle turtle)
public void draw(processing.core.PApplet parent)
DrawCommand
draw
in class DrawCommand
parent
- the PApplet to draw topublic TurtleState draw(processing.core.PApplet parent, TurtleState state)
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