/**
 * Robot program to plant a diagonal line of 10 beepers at 1st and 1st, 
 * 2nd and 2nd ... 10th and 10th.  In this version of the program, we define
 * a new class of robot called DiagonalMoverRobot that includes both the
 * turnRight() capability and the moveDiagonally() capability in one class
 * 
 * @author Russell C. Bjork 
 * @version January 9, 2006
 */
import kareltherobot.*;

public class PlantDiagonal2 implements Runnable, Directions
{
	/** Main method - set up the world and start the program
	 */
    public static void main(String [] args)
    { 
      	World.readWorld("PlantDiagonal.world");
      	World.setVisible(true);
      	World.setupThread(new PlantDiagonal2());
      	World.setTrace(false);
      	World.showSpeedControl(true);
    }
    
    /** Method that describes the task to be performed.
     */  
    public void run()
    {
        // Create a new robot at 1st and 1st facing East, with 10 beepers
 		
        DiagonalMoverRobot2 karel = new DiagonalMoverRobot2(1, 1, East, 10);        

		// Plant the beepers

		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		karel.moveDiagonally();
		karel.putBeeper();
		
		// We're done
		
		karel.turnOff();

	}
}