Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Turtle t;
- public SpeziellesQuadrat(int s_laenge, int anzahl)
- {
- t = new Turtle ();
- t.zumStart (100,100);
- //t.zeige();
- t.setzeFarbe(4);
- zeichneSpeziellesQuadrat(s_laenge,anzahl);
- }
- public void zeichneQuadrat(int s)
- {
- for (int i=0;i<4;i++)
- {
- t.vor(s) ;
- t.drehe(90);
- t.vor(s) ;
- t.drehe(-90);
- t.vor(s) ;
- t.drehe(-90);
- t.vor(s) ;
- t.drehe(90);
- }
- t.vor(s);
- t.drehe(90);
- }
- public void zeichneSpeziellesQuadrat(int s,int a)
- {
- for(int k=0;k<a;k++)
- {
- zeichneQuadrat(s);
- }
- }
- }
Add Comment
Please, Sign In to add comment