Class Alternator
java.lang.Object
Turtle
Artist
Alternator
- class Alternator
- extends Artist
|
Method Summary |
void |
move(double distance)
Ask the turtle to move forward the specified distance along its current heading. |
| Methods inherited from class Turtle |
die, done, getColor, isAlive, isPenDown, lt, lt, move, penDown, penUp, rt, rt, setColor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
current
Color current
other
Color other
Alternator
public Alternator(Color c1,
Color c2)
move
public void move(double distance)
- Description copied from class:
Turtle
- Ask the turtle to move forward the specified distance along its current heading.
This will draw a trail if the pen is down.
- Overrides:
move in class Turtle
- Parameters:
distance - How long a line to draw.