public class TurtleAnimationDemo extends Thread { public static void main(String[] args) { World earth = new World(); Turtle donatello = new Turtle(10, 240, earth); Turtle michelangelo = new Turtle(100, 240, earth); forwardSlowly(donatello, 100, 10); forwardSlowly(michelangelo, 100, 1); }// end of main // moves ' pixels' 1 pixel at a time with // a 'delay' millisecond delay between each step public static void forwardSlowly(Turtle turtle, int distance, int delay) { for (int i = 0; i < distance; i++) { turtle.forward(1); try{Thread.sleep(delay);} catch (InterruptedException ex) {} } }// end of forwardSlowly }