Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void bäume()
- {
- while( !fliegeAmPlatz() )
- {
- if( hindernisRechts() && !hindernisVorn() )
- {
- schritt();
- }
- if( hindernisVorn() && hindernisRechts() )
- {
- linksDrehen();
- }
- if( !hindernisRechts() )
- {
- rechtsDrehen();
- schritt();
- }
- }
- }
- public void bäume2()
- {
- while( !fliegeAmPlatz() )
- {
- if( hindernisRechts() && !hindernisVorn() )
- {
- schritt();
- }
- if( hindernisVorn() )
- {
- linksDrehen();
- }
- if( !hindernisRechts() )
- {
- rechtsDrehen();
- schritt();
- schritt();
- rechtsDrehen();
- schritt();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement