i want it to make a semicircle so i created a method with the following code
public void drawSemiCircle(int radius)
{
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
this.turn(20);
this.forward(5);
}
its too long and repetative, is there anyway to make it shorter?
new at this

New Topic/Question
Reply



MultiQuote




|