Add a turtle to the world

Finally, Listing 8 instantiates a new Turtle object in the default color,

Then Listing 8 causes the turtle

Listing 8. Add a turtle to the world.
          Turtle turtle = new Turtle(world);
          turtle.turn(90);
        }//end actionPerformed
        
      }//end class definition
    );//end addActionListener

  }//end run
  //---------------------------------------//
}//end class Prob03Runner
File: bt.htm [Next] [Prev]