Pick Beepers until Facing South Wall

Dependencies:   mbed

main.cpp

Committer:
mSeiser
Date:
2015-04-24
Revision:
0:7d9c3a278828

File content as of revision 0:7d9c3a278828:

#include "mbed.h"
#include "Robot.h"
#include "ur_Bertl.h"
#include "const.h"


class NewClass : public ur_Bertl
{
    public:
     void ClearAllBeepersToTheWall();
    
    
};

void NewClass :: ClearAllBeepersToTheWall()
{
     while(FrontIsClear())
     {
         
         if(NextToABeeper())
            {
                PickBeeper();
                NibbleLeds(AnyBeeperInBag());
                wait(0.5);
                Move();
            }
        else
         Move();
     
     }
       
}


int main()
{
    NewClass karel;
    
    karel.ClearAllBeepersToTheWall();       
    
}