import lejos.nxt.*;
import lejos.navigation.Pilot;

/**
 * Trace a square 
 * @author Roger
 */
public class SquareTracer
{
    Pilot pilot ;
    public void  drawSquare(float length)
    {
        for(int i = 0; i<4 ; i++)
        {
            pilot.travel(length);
            pilot.rotate(90);                 
        }
    }
    public static void main(String[] args)
    {
        SquareTracer sq = new SquareTracer();
        sq.pilot = new Pilot(2.25f, 5.5f, Motor.A, Motor.C);
        sq.drawSquare(20);
    }
}