Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1.  
  2. public class Bunt
  3. {
  4. private Turtle k;
  5. public Bunt(int startx, int starty, double groesse, double anzahl, double reihen)
  6. {
  7. k = new Turtle();
  8. //k.zeige();
  9. zeichneVieleKreise(anzahl, groesse, reihen, startx, starty);
  10.  
  11. }
  12.  
  13. public void zeichneVieleKreise(double a,double g,double r, int x, int y){
  14. for(int i=0;i<r;i++){
  15. for(int j=0;j<a;j++){
  16. if (i%2==0){
  17. if (j%2==0){
  18. k.setzeFarbe(4);
  19. }
  20. else
  21. {
  22. k.setzeFarbe(1);
  23. }
  24. }
  25. else {
  26. if (j%2==1){
  27. k.setzeFarbe(4);
  28. }
  29. else
  30. {
  31. k.setzeFarbe(1);
  32. }
  33. }
  34.  
  35. k.hebeStift();
  36. k.geheNach(2*g*j+x, 2*g*i+y);
  37. k.senkeStift();
  38. k.fuelleKreis(g);
  39. }
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement