Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public void bäume()
  2. {
  3. while( !fliegeAmPlatz() )
  4. {
  5. if( hindernisRechts() && !hindernisVorn() )
  6. {
  7. schritt();
  8. }
  9. if( hindernisVorn() && hindernisRechts() )
  10. {
  11. linksDrehen();
  12. }
  13. if( !hindernisRechts() )
  14. {
  15. rechtsDrehen();
  16. schritt();
  17. }
  18. }
  19. }
  20.  
  21. public void bäume2()
  22. {
  23. while( !fliegeAmPlatz() )
  24. {
  25. if( hindernisRechts() && !hindernisVorn() )
  26. {
  27. schritt();
  28. }
  29. if( hindernisVorn() )
  30. {
  31. linksDrehen();
  32. }
  33.  
  34. if( !hindernisRechts() )
  35. {
  36. rechtsDrehen();
  37. schritt();
  38. schritt();
  39. rechtsDrehen();
  40. schritt();
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement