Hello I had a quick question. I want add objects of a bubble placed diagonal. My first bubble must have x and y start at (0,0) then (30,30), (60,60) and so on and then finish at (600,600). I only need 21 bubbles to do this and need to use a while loop. My problem is when I compile they are either bunched in one group or my screen stays frozen and it says I may have an infinite loop. Any advice would be appreciated. FYI those parentheses are meant to be brackets but it wouldnt show on the screen when I posted.
Bubble() bubble = new Bubble(21);
int i =0;
while (i < bubble.length)
{
bubble(i) = new Bubble();
addObject(bubble(i), 0, 0);
i = i + 30;
}
2nd attempt:
Bubble() bubble = new Bubble(21);
int i =0;
while (i < bubble.length)
{
bubble(i) = new Bubble();
addObject(bubble(i)+30, 0, 0);
i = i +1;
}
