Versuch 2

Dependencies:   mbed

Revision:
2:0e1b409ff333
Parent:
1:5bcd7fd92f60
Child:
3:8587d08d9f65
diff -r 5bcd7fd92f60 -r 0e1b409ff333 main.cpp
--- a/main.cpp	Thu Apr 23 12:12:01 2015 +0000
+++ b/main.cpp	Thu Apr 23 12:33:34 2015 +0000
@@ -7,50 +7,26 @@
 
 
 
-/*
-int main()
-{
-    ur_Bertl karel;
-    while( !karel.NextToABeeper() )
-    {
-        karel.Move();
-    }
-    karel.PickBeeper();
-    
-}
-
-*/
-
-
-
 
 int main()
 {
     ur_Bertl karel;
-    int z = 0;
     
-    while(1) 
+    while(1)
     {
-        if(karel.NextToABeeper()) 
-        {
-            z = z++;
-            if(z == 1) 
-            {
-                karel.RGBLed(1,0,0);
-            }
-            
-            else if(z == 2) 
-            {
-                karel.RGBLed(0,1,0);
-            }
-            
-            else if(z > 2) 
-            {
-                karel.RGBLed(0,0,1);
-            }
-            
+        while(karel.NextToABeeper())
+        {       
+            karel.Move();
         }
-        karel.Move();
+        karel.MoveBackwards();
+        karel.TurnLeft();
+        
+    }
+    
+}
 
-    }
-}
\ No newline at end of file
+
+
+
+
+