Last active
November 6, 2020 15:36
-
-
Save ArianK16a/350a241bbe03a084253cba205bccdb28 to your computer and use it in GitHub Desktop.
Revisions
-
ArianK16a revised this gist
Nov 6, 2020 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,10 @@ import codescape.Dogbot; public class MyDogbot extends Dogbot { public void run() { // move(), turnLeft() und turnRight() werden benötigt // Die Energiezellen sind ohne weitere Kenntnisse noch nicht erreichbar // Dein Code hier: int moves = 0; Boolean left = false; -
ArianK16a revised this gist
Nov 6, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import codescape.Dogbot; public class MyDogbot extends Dogbot { public void run() { // move(), turnLeft() und turnRight() werden benötigt // Die Energiezellen sind ohne weitere Kenntnisse noch nicht erreichbar // Dein Code hier: int moves = 0; Boolean left = false; -
ArianK16a revised this gist
Nov 6, 2020 . 1 changed file with 53 additions and 48 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,20 @@ import codescape.Dogbot; public class MyDogbot extends Dogbot { public void run() { // move(), turnLeft() und turnRight() werden benötigt // Die Energiezellen sind ohne weitere Kenntnisse noch nicht erreichbar // Dein Code hier: int moves = 0; Boolean left = false; Boolean right = false; Boolean pick = false; Boolean turn = false; int i = 0; int turn_count = 0; Boolean step1 = true; Boolean step2 = true; Boolean step3 = true; @@ -18,101 +24,100 @@ public class MyDogbot extends Dogbot{ Boolean step7 = true; Boolean step8 = true; Boolean step9 = true; while (true) { if (moves > 0) { move(); moves--; continue; } if (left) { turnLeft(); left = false; } if (right) { turnRight(); right = false; } if (pick) { pickUp(); pick = false; } if (turn && (i == turn_count)) { turn_count = i + 2; } if (i < turn_count) { right = true; i++; turn = !(i == turn_count); continue; } if (step1) { left = true; step1 = false; continue; } if (step2) { moves = 1; pick = true; turn = true; step2 = false; continue; } if (step3) { moves = 2; left = true; step3 = false; continue; } if (step4) { moves = 2; left = true; step4 = false; continue; } if (step5) { moves = 2; right = true; step5 = false; continue; } if (step6) { moves = 2; right = true; step6 = false; continue; } if (step7) { moves = 2; pick = true; turn = true; step7 = false; continue; } if (step8) { moves = 1; right = true; step8 = false; continue; } if (step9) { moves = 2; step9 = false; continue; } break; } } -
ArianK16a created this gist
Nov 4, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,121 @@ 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; } } }