/******************************* * Agent.java * * A simple agent for setting a * VacuumBot's behavior. * * by Andy Exley 12/03/02 *******************************/ import josx.robotics.*; public class Agent { public static void main(String args[]) throws InterruptedException { VacuumBot bot = new VacuumBot(); bot.moveForward(); while(!bot.atHome()) { if(bot.hitBump()) { bot.turnLeft(); bot.turnLeft(); } if(bot.onDirt()) bot.suck(); bot.moveForward(); } bot.shutdown(); } }