Está en la página 1de 1

void camina()

{
vuelta();
recoje();
while (notNextToABeeper)
{
move();
pared();
}
}
void recoje()
{
while (nextToABeeper)
{
pickbeeper();
}
}
void libre()
{
while((notNextToABeeper)&&(notFacingSouth))
{
turnleft();
}
}
void pared()
{
while((frontIsBlocked)&&(notFacingEast))
{
turnleft();
}
camina();
}
void vuelta()
{
if((notNextToABeeper)&&(frontIsClear))
{
turnleft();
turnleft();
}
}

También podría gustarte