I cannot get the bullseye to replicate itself 5 times even though I've already set the count to 5... any suggestions?
import java.awt.*;
public class Bullseye {
/** Creates a new instance of Main */
public Bullseye()
{
DrawingPanel Target = new DrawingPanel(300,400);
Graphics g = Target.getGraphics();
bullseye(g,100,100,50,5);
}
public static void bullseye(Graphics g, int x, int y, int diam, int count)
{
int r = diam/2;
int xloc = x;
int yloc = y;
boolean change = true;
for(int j=0;j<count;j++)
{
g.drawOval(xloc+(j*((1/count)/2)),yloc+(j*((1/count)/2)),r+(j*((1/count)/2)),r+(j*((1/count)/2)));
if(change)
{
g.setColor(Color.BLACK);
change = false;
}
else
{
g.setColor(Color.RED);
change = true;
}
}
}