The BFOIT Introduction to Programming Class
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.
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()
Table of Contents