I trying to great a patter but I don't get what the problem it is. any body can help please.
super(400, 400, 1);
boolean blue = true;
for (int x = 0; x < 8; x++)
{
if (blue) //alternate colors at the start of each column
blue = false;
else
blue = true;
for (int y = 0; y < 8; y++)
{
if (blue) // alternate colors
{
ColorPatch blueSquare = new ColorPatch (0, 0, 255);
addObject (blueSquare, x*50 + 25, y*50 + 25);
blue = false;
}
else
{
ColorPatch redSquare = new ColorPatch (255, 0, 0);
addObject (redSquare, x*50 + 25, y*50 + 25);
blue = true;
}
}
}
}
}