How would it possible to make a for loop to populate 2 arrays for my worlds x and y positions(800, 600). Such that the arrary is evenly spaced across the dimension x or y, 10 times?
Thanks.
int dy = getHeight/10;
int dx = getWidth()/10;
int y = dy/2;
for (int j=0; j<10; j++)
{
int x = dx/2;
for (int i=0; i<10; i++)
{
// if array has object at [j][i], addObject at (x, y);
x += dx;
}
y += dy;
}addObject(new Apple(), x, y);