title: How to reset a for loop and also simplify it?
body: <p>say i have 4 variables:</p>
  
  <pre><code>int counter = 0;
  int counter2 = -6;
  int counter3 = -12;
  int counter4 = -18;
  </code></pre>
  
  <p>These 4 variables increase in a certain if statement that fires from time to time as such:</p>
  
  <pre><code>if (such and such)
  {
      counter++;
      counter2++;
      counter3++;
      counter4++;
  }
  </code></pre>
  
  <p>and in order these draw circles around the screen in rows, so counter draws circles in the first row, and once that row is filled, counter2 fills the second row and so on:</p>
  
  <pre><code>for (int i = 0; i &lt; counter; i++) {
      ellipse(ScoreX+ i * 80, 40, BallSize, BallSize);
    }
    for (int j = 0; j &lt; counter2; j++)
    {
      ellipse(ScoreX + j * 80, 120, BallSize, BallSize);
    }
  for (int k = 0; k &lt; counter3; k++)
    {
      ellipse(ScoreX + k * 80, 200, BallSize, BallSize);
    }
  for (int l = 0; l &lt; counter4; l++)
    {
      ellipse(ScoreX + l * 80, 280, BallSize, BallSize);
    }
  </code></pre>
  
  <p>My problem is that once the circles have been drawn all over the screen, I want this whole process to reset and keep happening until the program has been manually closed by me. </p>
  
  <p>What i mean by this is that, the program will know that counter4 (the last row of circles) has filled up the space with circles and once the last row is filled up, the program resets this whole process going back to filling row one.</p>
  
  <p>Also, is there a way that this loop can be simplified?</p>
  
  <p>EDIT: I found a way to restart it with a simple if statement as such:</p>
  
  <pre><code>if (counter4 == 7)
    {
      counter = 0;
      counter2 = -6;
      counter3 = -12;
      counter4 = -18;
    }
  </code></pre>