David Hasenhüttl
/
Bertl_MovePickBeeperBack
Needs A Serial Output to work as expected
Revision 1:3040db070a3a, committed 2015-05-08
- Comitter:
- davidhasenhuettl
- Date:
- Fri May 08 09:20:27 2015 +0000
- Parent:
- 0:d3427d975dfe
- Commit message:
- Needs A Serial Output to work as expected
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d3427d975dfe -r 3040db070a3a main.cpp --- a/main.cpp Fri May 08 08:31:38 2015 +0000 +++ b/main.cpp Fri May 08 09:20:27 2015 +0000 @@ -12,8 +12,7 @@ ur_Bertl karel; - while( karel.FrontIsClear()) - { + while( karel.FrontIsClear()){ if (karel.NextToABeeper()){ karel.PickBeeper(); Beeper = Beeper+1; @@ -22,9 +21,10 @@ karel.Move(); moves++; } - - else - karel.TurnLeft(); + else { + karel.Move(); + moves++; + } } karel.Move();