import becker.robots.*; /** * Program to run a relay race * @author Mary Elaine Califf * */ public class RelayRace { public static void main(String[] args) { // set up initial situation City raceTrack = new City(); Thing baton = new Thing(raceTrack,3,0); Wall wall = new Wall(raceTrack,3,6,Direction.EAST); Robot bob = new Robot(raceTrack,2,0,Direction.SOUTH); Robot karel = new Robot(raceTrack,2,3,Direction.SOUTH); bob.setLabel("B"); karel.setLabel("K"); // run the race bob.move(); bob.pickThing(); bob.turnLeft(); bob.move(); bob.move(); bob.move(); bob.putThing(); karel.move(); karel.pickThing(); karel.turnLeft(); karel.move(); karel.move(); karel.move(); karel.putThing(); } }