![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
GoToBeeper
Fork of GoToBeeper2 by
main.cpp@0:6e9ea56b10d9, 2015-04-23 (annotated)
- Committer:
- Markus_Watko
- Date:
- Thu Apr 23 12:03:31 2015 +0000
- Revision:
- 0:6e9ea56b10d9
- Child:
- 1:0f309ef92d1e
GoToBeeper
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Markus_Watko | 0:6e9ea56b10d9 | 1 | #include "mbed.h" |
Markus_Watko | 0:6e9ea56b10d9 | 2 | #include "ur_Bertl.h" |
Markus_Watko | 0:6e9ea56b10d9 | 3 | |
Markus_Watko | 0:6e9ea56b10d9 | 4 | |
Markus_Watko | 0:6e9ea56b10d9 | 5 | int main() |
Markus_Watko | 0:6e9ea56b10d9 | 6 | { |
Markus_Watko | 0:6e9ea56b10d9 | 7 | ur_Bertl karel; |
Markus_Watko | 0:6e9ea56b10d9 | 8 | |
Markus_Watko | 0:6e9ea56b10d9 | 9 | /* if(!karel.NextToABeeper()) |
Markus_Watko | 0:6e9ea56b10d9 | 10 | { |
Markus_Watko | 0:6e9ea56b10d9 | 11 | karel.Move(); |
Markus_Watko | 0:6e9ea56b10d9 | 12 | } |
Markus_Watko | 0:6e9ea56b10d9 | 13 | |
Markus_Watko | 0:6e9ea56b10d9 | 14 | if(!karel.NextToABeeper()) |
Markus_Watko | 0:6e9ea56b10d9 | 15 | { |
Markus_Watko | 0:6e9ea56b10d9 | 16 | karel.Move(); |
Markus_Watko | 0:6e9ea56b10d9 | 17 | } |
Markus_Watko | 0:6e9ea56b10d9 | 18 | |
Markus_Watko | 0:6e9ea56b10d9 | 19 | if(!karel.NextToABeeper()) |
Markus_Watko | 0:6e9ea56b10d9 | 20 | { |
Markus_Watko | 0:6e9ea56b10d9 | 21 | karel.Move(); |
Markus_Watko | 0:6e9ea56b10d9 | 22 | } |
Markus_Watko | 0:6e9ea56b10d9 | 23 | |
Markus_Watko | 0:6e9ea56b10d9 | 24 | karel.PickBeeper(); |
Markus_Watko | 0:6e9ea56b10d9 | 25 | */ |
Markus_Watko | 0:6e9ea56b10d9 | 26 | |
Markus_Watko | 0:6e9ea56b10d9 | 27 | while(!karel.NextToABeeper()) |
Markus_Watko | 0:6e9ea56b10d9 | 28 | { |
Markus_Watko | 0:6e9ea56b10d9 | 29 | karel.Move(); |
Markus_Watko | 0:6e9ea56b10d9 | 30 | } |
Markus_Watko | 0:6e9ea56b10d9 | 31 | |
Markus_Watko | 0:6e9ea56b10d9 | 32 | if(karel.NextToABeeper()) |
Markus_Watko | 0:6e9ea56b10d9 | 33 | { |
Markus_Watko | 0:6e9ea56b10d9 | 34 | karel.PickBeeper(); |
Markus_Watko | 0:6e9ea56b10d9 | 35 | } |
Markus_Watko | 0:6e9ea56b10d9 | 36 | } |