Dominik Weiss
/
Liniensensor_2
Versuch 2
Revision 3:8587d08d9f65, committed 2015-04-24
- Comitter:
- Dominik32
- Date:
- Fri Apr 24 07:46:09 2015 +0000
- Parent:
- 2:0e1b409ff333
- Commit message:
- Liniensensor Versuch 2;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0e1b409ff333 -r 8587d08d9f65 main.cpp --- a/main.cpp Thu Apr 23 12:33:34 2015 +0000 +++ b/main.cpp Fri Apr 24 07:46:09 2015 +0000 @@ -11,6 +11,7 @@ int main() { ur_Bertl karel; + int x = 0; while(1) { @@ -20,13 +21,14 @@ } karel.MoveBackwards(); karel.TurnLeft(); + x = x++; + + if ( x % 2 == 0) + { + karel.TurnLeft(); //Damit er nicht zurückfährt + } } } - - - - -