Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ViererReiheLegen(){
- if (!karol.IstWand()){
- for (i = 0;i<=3; i++){
- if (!karol.IstWand()){
- if (karol.IstZiegel()){
- karol.Schritt();
- if (karol.IstZiegel()){
- karol.Schritt();
- Umdrehen();
- karol.Hinlegen();
- karol.Schritt();
- Umdrehen();
- } else {
- Umdrehen();
- karol.Schritt();
- Umdrehen();
- karol.Hinlegen();
- karol.Schritt();
- }
- } else {
- karol.Hinlegen();
- karol.Schritt();
- }
- }
- if (karol.IstWand()){
- print = true;
- } else {
- print = false;
- }
- }
- if (print = true){
- System.out.println("Fehler: Sie haben eine Wand erreicht!");
- }
- } else
- if (print = true){
- System.out.println("Fehler: Sie haben eine Wand erreicht!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement