public class Turtle extends java.lang.Object implements java.lang.Cloneable, TurtleInterface
Modifier and Type | Field and Description |
---|---|
private float |
angle |
private float |
x |
private float |
y |
VERSION
Constructor and Description |
---|
Turtle(float x,
float y,
float angle)
Constructor
|
Turtle(Turtle turtle)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
float |
getTheta()
Angle getter
|
float |
getX()
X position getter
|
float |
getY()
Y position getter
|
void |
setTheta(float theta)
Angle setter
|
void |
setX(float x)
X position setter
|
void |
setY(float y)
Y position setter
|
public Turtle(Turtle turtle)
turtle
- public Turtle(float x, float y, float angle)
x
- y
- angle
- public java.lang.Object clone()
clone
in interface TurtleInterface
clone
in class java.lang.Object
public float getX()
getX
in interface TurtleInterface
public float getY()
getY
in interface TurtleInterface
public float getTheta()
getTheta
in interface TurtleInterface
public void setX(float x)
setX
in interface TurtleInterface
x
- position floatpublic void setY(float y)
setY
in interface TurtleInterface
y
- position floatpublic void setTheta(float theta)
setTheta
in interface TurtleInterface
theta
-