import becker.robots.*;

class RememberingRobot extends Robot
{
	
	int iStartedOnStreet;
	int iStartedOnAvenue;
	
	public RememberingRobot(City c, int st, int ave, Direction dir, int num)
	{
		super(c, st, ave, dir, num);
	}

	public void RememberStartingLocation()
	{
		this.iStartedOnStreet = this.getStreet();
		this.iStartedOnAvenue = this.getAvenue();
	}
	
	public void PrintDistanceMoved()
	{
		int tempStreet = this.getStreet();
		int tempAve = this.getAvenue();
		int movedStreets = tempStreet - this.iStartedOnStreet;
		int movedAvenues = tempAve - this.iStartedOnAvenue;
		System.out.println("This robot has moved:");
		System.out.println(movedStreets + " streets south");
		System.out.println(movedAvenues + " avenues east");
	}
}

public class RememberingRobot_Example extends Object
{
	public static void main(String[] args)
	{ 
		City toronto = new City();
		RememberingRobot Jo = new RememberingRobot(toronto, 3, 0, Direction.WEST, 0);
		new Thing(toronto, 3, 2);
		
		Jo.RememberStartingLocation();
		Jo.turnLeft();
		Jo.move();
		Jo.move();
		Jo.move();
		Jo.PrintDistanceMoved();
		
	} // this is the old line 32
}


