BFOIT - Introduction to Computer Programming

Introduction to Computer Programming - drawBoard.java

Turtle Graphics in Java
drawBoard.java

Here is the source code for my drawBoard() method and a Java Applet that demonstrates what happens when it is executed.

Your browser does not support Java applets. Click here for more information.

void drawBoard()
{
   setheading( 0 );
   penup();
   setxy( -50, -150 );
   pendown();
   forward( 300 );
   penup();
   setxy( 50, -150 );
   pendown();
   forward( 300 );
   setheading( 90 );
   penup();
   setxy(-150, -50 );
   pendown();
   forward( 300 );
   penup();
   setxy( -150, 50 );
   pendown();
   forward( 300 );
   penup();

} // end drawBoard()

                

Public Domain Mark
This work (BFOIT: Introduction to Computer Programming, by Guy M. Haas),
identified by Berkeley Foundation for Opportunities in IT (BFOIT),
is free of known copyright restrictions.