![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Sammelt Beeper ein und NibbelLeds zählen wie viele Beeper in der Tasche sind :)
main.cpp
- Committer:
- martinale
- Date:
- 2015-04-24
- Revision:
- 0:8bd44a190572
File content as of revision 0:8bd44a190572:
#include "mbed.h" #include "Robot.h" #include "const.h" class Bertl_Beeper : public Robot { public: void ClearAllBeeperToTheWall(); }; void Bertl_Beeper :: ClearAllBeeperToTheWall() { while(FrontIsClear()) { if(NextToABeeper()) { PickBeeper(); NibbleLeds(AnyBeeperInBag()); wait(1); Move(); } else Move(); } } int main() { Bertl_Beeper karel; karel.ClearAllBeeperToTheWall(); }