implemented support for else if constructs

This commit is contained in:
weckyy702 committed 2021-01-04 16:43:21 +01:00
1 parent f9e0d7f4b0
commit 8ba7936311
2 files changed
+29 -22

No files matched your search

+6 -8
View File
@@ -28,14 +28,12 @@ public class Rover extends Actor
if(richtung.equals("Hoch")) {
pri = "links";
sec = "rechts";
} else {
if (richtung.equals("Runter")) {
pri = "rechts";
sec = "links";
} else {
nachricht("JUNGE DU SPAST!");
return;
}
} else if (richtung.equals("Runter")) {
pri = "rechts";
sec = "links";
} else {
nachricht("JUNGE DU SPAST!");
return;
}
drehe(pri);
fahre();