Last active
November 6, 2020 15:36
-
-
Save ArianK16a/350a241bbe03a084253cba205bccdb28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import codescape.Dogbot; | |
| public class MyDogbot extends Dogbot{ | |
| public void run() { | |
| // Dein Code hier: | |
| // z.B. move(); | |
| Boolean function1 = false; | |
| Boolean function2 = false; | |
| Boolean function3 = false; | |
| Boolean function4 = false; | |
| Boolean step1 = true; | |
| Boolean step2 = true; | |
| Boolean step3 = true; | |
| Boolean step4 = true; | |
| Boolean step5 = true; | |
| Boolean step6 = true; | |
| Boolean step7 = true; | |
| Boolean step8 = true; | |
| Boolean step9 = true; | |
| Boolean step10 = true; | |
| Boolean step11 = true; | |
| Boolean step12 = true; | |
| while (true) { | |
| if (function1) { | |
| move(); | |
| function1 = false; | |
| } | |
| if (function2) { | |
| turnRight(); | |
| function2 = false; | |
| } | |
| if (function3) { | |
| turnLeft(); | |
| function3 = false; | |
| } | |
| if (function4) { | |
| pickUp(); | |
| function4 = false; | |
| } | |
| if (step1) { | |
| function1 = true; | |
| step1 = false; | |
| continue; | |
| } | |
| if (step2) { | |
| function2 = true; | |
| step2 = false; | |
| continue; | |
| } | |
| if (step3) { | |
| function1 = true; | |
| step3 = false; | |
| continue; | |
| } | |
| if (step4) { | |
| function1 = true; | |
| step4 = false; | |
| continue; | |
| } | |
| if (step5) { | |
| function1 = true; | |
| step5 = false; | |
| continue; | |
| } | |
| if (step6) { | |
| function4 = true; | |
| step6 = false; | |
| continue; | |
| } | |
| if (step7) { | |
| function2 = true; | |
| step7 = false; | |
| continue; | |
| } | |
| if (step8) { | |
| function2 = true; | |
| step8 = false; | |
| continue; | |
| } | |
| if (step9) { | |
| function1 = true; | |
| step9 = false; | |
| continue; | |
| } | |
| if (step10) { | |
| function2 = true; | |
| step10 = false; | |
| continue; | |
| } | |
| if (step11) { | |
| function1 = true; | |
| step11 = false; | |
| continue; | |
| } | |
| if (step12) { | |
| function1 = true; | |
| step12 = false; | |
| continue; | |
| } | |
| break; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment