|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
|
+--il.ac.tau.cs.software1.turtle.Turtle
A Turtle is a logo turtle that is used to draw. a turtle has a pen attached to a tail. If the tail is down the turtle draws as it moves on the plane.
Constructor Summary | |
Turtle()
constructs a new turtle |
Method Summary | |
double |
getAngle()
returns the direction which the turtle is facing |
static int |
getDelay()
return the delay the turtle |
double |
getX()
returns the x coordinate of the turtle's location |
double |
getY()
returns the y coordinate of the turtle's location |
void |
hide()
hides this turtle |
void |
home()
moves the turtle to it's initial location and orientation |
boolean |
isTailDown()
|
boolean |
isVisible()
|
void |
jumpTo(int newX,
int newY)
moves the turtle to the given x,y location without drawing a line from the current location |
static void |
main(java.lang.String[] args)
|
void |
moveBackward(double units)
moves the turtle backwards by the given units. |
void |
moveForward(double units)
moves the turtle forward by the given units. |
void |
setAngle(double angle)
sets the angle of which the turtle is facing to the given angle |
static void |
setDelay(int _delay)
sets the delay of the turtle motion in miliseconds - default delay is 0 |
void |
setVisible(boolean visible)
sets the visibility of the turtle |
void |
show()
shows this turtle |
void |
tailDown()
sets the turtle tail down |
void |
tailUp()
sets the turtle tail up |
void |
turnLeft(int degrees)
turns the turtle left by the given degrees |
void |
turnRight(int degrees)
turns the turtle right by the given degrees |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass,
hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Turtle()
Method Detail |
public void home()
public void jumpTo(int newX,
int newY)
newX
- newY
- public void moveForward(double units)
units
- public void moveBackward(double units)
units
- public void turnLeft(int degrees)
degrees
- public void turnRight(int degrees)
degrees
- public void tailDown()
public void tailUp()
public boolean isTailDown()
public void hide()
public void show()
public void setVisible(boolean visible)
visible
- public boolean isVisible()
public void setAngle(double angle)
angle
- public double getAngle()
public double getX()
public double getY()
public static void setDelay(int _delay)
_delay
- public static int getDelay()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |