Adding a new life once a score has been reached in a Java game
<p>Im developing a java game where you kill enemies and earn points. Every 3000 points you obtain id like to add 1 more life point to the players ship. My current implementation means that once you've reached 3000 points, you get 1 life for every kill (which is not what i want). What i would like is 1 life for every 3000 point (1 life at 3000, 1 more life at 6000). How would i go about doing this ?
My score method:</p>

<pre><code>public void incScore(int inc){
    //hit asteroid 100
    //hit spaceship 250
    //mothership = 500
    score = score + inc;
    if (score &gt;= 3000){
        playerShip.life = playerShip.life +1;
    }
}
</code></pre>