Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. void ViererReiheLegen(){
  2. if (!karol.IstWand()){
  3. for (i = 0;i<=3; i++){
  4. if (!karol.IstWand()){
  5. if (karol.IstZiegel()){
  6. karol.Schritt();
  7. if (karol.IstZiegel()){
  8. karol.Schritt();
  9. Umdrehen();
  10. karol.Hinlegen();
  11. karol.Schritt();
  12. Umdrehen();
  13. } else {
  14. Umdrehen();
  15. karol.Schritt();
  16. Umdrehen();
  17. karol.Hinlegen();
  18. karol.Schritt();
  19. }
  20. } else {
  21. karol.Hinlegen();
  22. karol.Schritt();
  23. }
  24. }
  25. if (karol.IstWand()){
  26. print = true;
  27. } else {
  28. print = false;
  29. }
  30. }
  31. if (print = true){
  32. System.out.println("Fehler: Sie haben eine Wand erreicht!");
  33. }
  34. } else
  35. if (print = true){
  36. System.out.println("Fehler: Sie haben eine Wand erreicht!");
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement