public static class TurtleDraw.Compound extends TurtleDrawCommand
Constructor and Description |
---|
Compound(Collection<TurtleDrawCommand> commands)
Create a new Compound command.
|
Compound(TurtleDrawCommand... commands)
Create a new Compound 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.
|
void |
setParent(processing.core.PApplet parent) |
call, draw, setTurtle
draw
public Compound(TurtleDrawCommand... commands)
commands
- the commands to be combinedpublic Compound(Collection<TurtleDrawCommand> commands)
commands
- the commands to be combinedpublic void setParent(processing.core.PApplet parent)
setParent
in class DrawCommand
public TurtleState draw(processing.core.PApplet parent, TurtleState state)
TurtleDrawCommand
draw
in class TurtleDrawCommand
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