Counters not decrementing or not being read in Breakout
<p>Okay, I've got this game loop which never terminates --</p>

<pre><code>public void run() {
    setup();
    addMouseListeners();
    int Turns = NTURNS;
    int TotalBricks = NBRICKS_PER_ROW * NBRICK_ROWS;
    while ((Turns&gt;0) &amp;&amp; (TotalBricks&gt;0)) {
        moveBall();
        checkForCollision();
        pause(DELAY);
    }
    System.exit(0);
}   
</code></pre>

<p>-- even though I have this method decrementing the Turns value every time the ball is missed:</p>

<pre><code>private void checkForCollision() {
    GObject collider = getCollidingObject();
    if (collider !=null) {
        if (collider == Paddle) {
            vy= -vy;
        }
        else {
            vy= -vy;
            remove(collider);
            TotalBricks = TotalBricks - 1;
        }
    }
    if((ball.getX()&gt;=(WIDTH-BALL_RADIUS)) || (ball.getX()&lt;=0)) {
        vx = -vx;
    }
    if(ball.getY()&lt;=0) {
        vy = -vy;
    }
    if(ball.getY()&gt;=HEIGHT) {
    Turns = Turns -1;
    remove(ball);
    newBall();
    }

}
</code></pre>

<p>plus this</p>

<pre><code>private int Turns;
</code></pre>

<p>at the bottom to ensure that the variable is shared among both methods.
No matter how many times the ball is missed, the game never stops.
What am I missing?
Thx</p>
