Guest User

Untitled

a guest
Jan 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. {
  2. Turtle t;
  3. public SpeziellesQuadrat(int s_laenge, int anzahl)
  4. {
  5. t = new Turtle ();
  6. t.zumStart (100,100);
  7. //t.zeige();
  8. t.setzeFarbe(4);
  9. zeichneSpeziellesQuadrat(s_laenge,anzahl);
  10. }
  11. public void zeichneQuadrat(int s)
  12. {
  13. for (int i=0;i<4;i++)
  14. {
  15. t.vor(s) ;
  16. t.drehe(90);
  17. t.vor(s) ;
  18. t.drehe(-90);
  19. t.vor(s) ;
  20. t.drehe(-90);
  21. t.vor(s) ;
  22. t.drehe(90);
  23.  
  24.  
  25. }
  26. t.vor(s);
  27. t.drehe(90);
  28. }
  29. public void zeichneSpeziellesQuadrat(int s,int a)
  30. {
  31. for(int k=0;k<a;k++)
  32. {
  33. zeichneQuadrat(s);
  34. }
  35. }
  36.  
  37. }
Add Comment
Please, Sign In to add comment