Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1.  
  2. public class farbigeReihen
  3. {
  4. private Turtle k;
  5. public farbigeReihen(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 (j%3==0){
  17. k.setzeFarbe(4);
  18. }
  19. else if(j%3==1)
  20. {
  21. k.setzeFarbe(3);
  22. }
  23. else
  24. {
  25. k.setzeFarbe(1);
  26. }
  27. k.hebeStift();
  28. k.geheNach(2*g*j+x, 2*g*i+y);
  29. k.senkeStift();
  30. k.fuelleKreis(g);
  31. }
  32.  
  33. }
  34. }
  35.  
  36.  
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement