this is turtle.
forward
public void forward(double step)
Turtle moves forward, will draw line if penDown.
getDirection
public double getDirection()
getForwardAction
public Action getForwardAction()
getPenDownAction
public Action getPenDownAction()
getPenUpAction
public Action getPenUpAction()
getPosition
public Point2D getPosition()
getResetAction
public Action getResetAction()
getTurnLeftAction
public Action getTurnLeftAction()
getTurnRightAction
public Action getTurnRightAction()
isPenDown
public boolean isPenDown()
moveTo
public void moveTo(double x,
double y)
Turtle jumps to position, will draw line if penDown,
keeps direction.
penDown
public void penDown()
Turtle will draw line when moving.
penUp
public void penUp()
Turtle will not draw line when moving.
resetTurtle
public void resetTurtle()
this will be called to remove all drawn lines
and reset turtle to default direction and position.
no drawing will occur.
turn
public void turn(double degree)
Turtle turns by degree relativ to current direction.
if degree positive turn clockwise,
otherwise turn counterclockwise
(or the other way around, i don't know).
turnTo
public void turnTo(double degree)
Tutle turns to given direction.