Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bunt
- {
- private Turtle k;
- public Bunt(int startx, int starty, double groesse, double anzahl, double reihen)
- {
- k = new Turtle();
- //k.zeige();
- zeichneVieleKreise(anzahl, groesse, reihen, startx, starty);
- }
- public void zeichneVieleKreise(double a,double g,double r, int x, int y){
- for(int i=0;i<r;i++){
- for(int j=0;j<a;j++){
- if (i%2==0){
- if (j%2==0){
- k.setzeFarbe(4);
- }
- else
- {
- k.setzeFarbe(1);
- }
- }
- else {
- if (j%2==1){
- k.setzeFarbe(4);
- }
- else
- {
- k.setzeFarbe(1);
- }
- }
- k.hebeStift();
- k.geheNach(2*g*j+x, 2*g*i+y);
- k.senkeStift();
- k.fuelleKreis(g);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement