Package turtle
Class DrawableTurtle
java.lang.Object
turtle.DrawableTurtle
- All Implemented Interfaces:
Turtle
public class DrawableTurtle extends Object implements Turtle
Turtle for drawing in a window on the screen.
PS0 instructions: do NOT change this class.
-
Constructor Summary
Constructors Constructor Description DrawableTurtle()Create a new turtle for drawing on screen. -
Method Summary
Modifier and Type Method Description voidcolor(PenColor color)Change the turtle's current pen color.voiddraw()Draw the image created by this turtle in a window on the screen.voidforward(int steps)Move the turtle forward a number of steps.voidturn(double degrees)Change the turtle's heading by a number of degrees clockwise.
-
Constructor Details
-
DrawableTurtle
public DrawableTurtle()Create a new turtle for drawing on screen.
-
-
Method Details
-
forward
public void forward(int steps)Description copied from interface:TurtleMove the turtle forward a number of steps. -
turn
public void turn(double degrees)Description copied from interface:TurtleChange the turtle's heading by a number of degrees clockwise. -
color
Description copied from interface:TurtleChange the turtle's current pen color. -
draw
public void draw()Draw the image created by this turtle in a window on the screen.
-