University of Northampton: Junkbots

Framework

public class bomb_1 {

           public static void main(String[] args)

             {

                     robot2 robot=new robot2();

                          for(;;)

                          {               

                                if (robot.checkLight(1)==false)

                                       {

                                            //put instructions here for actions to be carried out if no line i                                           //is detected

                                        }

                                        if (robot.checkLight(1)==true)

                                                   {               

                                                       //put instructions here for actions to be carried out                                                        //when a line is detected for the                                                                                //first time                       

                                                       while(robot.checkLight(1)==false)

                                                               {

                                                                  //put instructions here for actions to be car                                                                       //ried out when a line is

                                                                  //not detected after the first line

                                                                }

                                                                if (robot.checkLight(1)==true)

                                                                {

                                                                //put instructions here for ac                                                                                       //tions to be carried out when

                                                                    //a line has been detected for

                                                                   // a second time

                                                   }

                                  }

                 }

}