I made a program that creates shapes and stars, but I keep getting one extra line whenever I do stars as seen here.
I can't seem to find a straightforward way to fix it that doesn't screw up regular shapes (not stars)
Here is the code:
Any good way to get rid of it?
public class Signature {
public static void main (String[] args) { System.print.ln (//insert witty phrase here) }
}
Martin Vanyavchich
Ranch Hand
Joined: Sep 16, 2008
Posts: 241
posted
0
This kind of stuff is probably a loop going round one to many times. Are you sure your while exit condition is right?
Why are your two calculations for "previousy" different, but your two calculations for "previousx" are the same?
Noah Faust
Greenhorn
Joined: Mar 07, 2009
Posts: 26
posted
0
Thanks Paul!, I had changes the window size from 1000x1000 to 700x700, but I must have missed changing the center point (500 to 350) on the very first Y value. It works perfectly now that you caught that.