Class Alternator

java.lang.Object
  extended byTurtle
      extended byArtist
          extended byAlternator

class Alternator
extends Artist


Field Summary
(package private)  Color current
           
(package private)  Color other
           
 
Constructor Summary
Alternator(Color c1, Color c2)
           
 
Method Summary
 void move(double distance)
          Ask the turtle to move forward the specified distance along its current heading.
 
Methods inherited from class Artist
cross, cross, polygon, polygons, rightTriangle, square, square, triangle, triangle
 
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
 

Field Detail

current

Color current

other

Color other
Constructor Detail

Alternator

public Alternator(Color c1,
                  Color c2)
Method Detail

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.