danpost - that will work well but what I need now if how will I be able to read that in my car class, i.e. how do I write the code which will can see what value the variable choice is at?
public void bumpCount(int amount)
{
totalCount += amount;
setImage(new GreenfootImage("" + totalCount, 20, Color.WHITE, Color.BLACK));
}totalCount = 0;
setImage(new GreenfootImage(""+totalCount,20,Color.WHITE,Color.BLACK));if (Greenfoot.mouseClicked(this))
{
world worldWorld = (world) getWorld();
Counter3 counter3 = worldWorld.getCounter3();
counter3.setCount(0);
}public void setCount(int amount)
{
totalCount = amount;
setImage(new GreenfootImage("" + totalCount, 20, Color.WHITE, Color.BLACK));
}int choise = counter3.getValue();