Class Bertl added

Dependencies:   HCSR

Dependents:   BERTL_ButtonLeds Bertl_Arbeit FollowLine SerialPC ... more

Fork of ur_Bertl by BULME_BERTL_2CHEL

Robot.cpp

Committer:
bulmecisco
Date:
2015-04-17
Revision:
8:07e55b300ff1

File content as of revision 8:07e55b300ff1:

/***********************************
name:   Robot.cpp    Version: 1.0
author: PE HTL BULME
email:  pe@bulme.at
WIKI:   https://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/
description:
        Implementation Robot for objectivRobot
        
The following lines have to be added or changed to the *.kpp file:

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

class Bertl : public Robot  // public
{
    public:
       Bertl(int x, int y, int d, int b){}; // dumy constrctor with same name as the class name
       
rest as in KPP-file:
see in objectBertl/projects/L1_Ex1.KPP

***********************************/
#include "mbed.h"
#include "Robot.h"
#include "ur_Bertl.h"

//Robot::Robot(int x, int y, char[] dir, int beeper) : ur_Robot(){}

void Robot :: move()   // Definieren
{
    Move();
}

void Robot :: turnLeft()
{
    TurnLeft();
}

void Robot :: pickBeeper()
{
    PickBeeper();
}

void Robot :: putBeeper()
{
    PutBeeper();
}

bool Robot :: frontIsClear()
{
    return FrontIsClear();
}

bool Robot :: nextToABeeper()      //is there one or more beepers in the same corner? 
{
    return NextToABeeper();
}
bool Robot :: nextToARobot()        //is there another robot in the corner?
{
    return false;
}
bool Robot :: facingNorth()         //is the robot facing North?
{
    return true;
}
bool Robot :: facingSouth()      // is the robot facing South?
{
    return true;
}
bool Robot :: facingEast()       // is the robot facing East?
{
    return true;
}
bool Robot :: facingWest()       // is the robot facing West?
{
    return true;
}
bool Robot :: anyBeepersInBeeperBag()    //are there any beepers in the bag?
{
    return AnyBeeperInBag();
}