Hi i'm trying to decrease the counter with 1 in the public void minScore
score++ adds the counter with 1 what is the equivalent to decrease the counter with 1 ?
public class Counter extends Actor
{
private int score = 0;
public void act()
{
setImage(new GreenfootImage("Score : 0" + score, 24, Color.WHITE, Color.BLUE));
}
/**
* Increase the total amount displayed on the counter, by a given amount.
*/
public void addScore()
{
score++;
}
public void minScore()
{
score++;
}
}