Aufgabe ClearAllBeepersToTheWall

Dependencies:   mbed

Meine Projekte

Diese Projekte habe ich im Sommersemester 2015 in FSST programmiert:
IfBertl: Programmcode
ZurueckAnDenStart: Programmcode
AufgabeClearAllBeepersToTheWall: Programmcode

Files at this revision

API Documentation at this revision

Comitter:
DerMax
Date:
Fri Apr 24 07:47:30 2015 +0000
Commit message:
Aufgabe ClearAllBeepersToTheWall

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
ur_Bertl.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 80d3f3cf7e82 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 24 07:47:30 2015 +0000
@@ -0,0 +1,34 @@
+#include "ur_Bertl.h"
+#include "mbed.h"
+#include "const.h"
+
+class ClearBertl : public ur_Bertl
+{
+public:
+    void ClearAllBeepersToTheWall();
+};
+
+void ClearBertl :: ClearAllBeepersToTheWall()
+{
+    while(FrontIsClear())
+    {
+        if(NextToABeeper())
+        {
+        PickBeeper();
+        Move();
+        }
+        else
+        {
+        Move();
+        }
+    } 
+        
+}
+
+int main()
+{
+    ClearBertl karel;
+    
+    karel.ClearAllBeepersToTheWall();
+}
+
diff -r 000000000000 -r 80d3f3cf7e82 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Apr 24 07:47:30 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file
diff -r 000000000000 -r 80d3f3cf7e82 ur_Bertl.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ur_Bertl.lib	Fri Apr 24 07:47:30 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#207a1e646191