java.lang.ObjectTurtle
public class Turtle
A class representing a Papert-style Turtle that can be moved about a canvas. This class acts as an initializer and wrapper for the JTF Turtle, so that it can be controlled through the BlueJ interface
Constructor Summary | |
---|---|
Turtle()
Constructor for objects of class Turtle |
Method Summary | |
---|---|
void |
forward()
|
void |
forward(double distance)
|
java.awt.Color |
getColor()
|
double |
getDirection()
|
double |
getSpeed()
|
boolean |
isPenDown()
|
void |
left(double angle)
|
void |
penDown()
|
void |
penUp()
|
void |
printText(java.lang.String message)
|
void |
right(double angle)
|
void |
setDirection(double dir)
|
void |
setLocation(double x,
double y)
|
void |
setPenColor(java.awt.Color color)
|
void |
setPenColorByName(java.lang.String color)
|
void |
setSpeed(double speed)
|
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Turtle()
Method Detail |
---|
public void forward()
public void forward(double distance)
public java.awt.Color getColor()
public double getDirection()
public double getSpeed()
public boolean isPenDown()
public void left(double angle)
public void penDown()
public void penUp()
public void printText(java.lang.String message)
public void right(double angle)
public void setDirection(double dir)
public void setLocation(double x, double y)
public void setPenColor(java.awt.Color color)
public void setPenColorByName(java.lang.String color)
public void setSpeed(double speed)