public void sammleGestein()
{
if(gesteinVorhanden())
{
wertAlt = wert;
wert = wert + ((Gestein)getOneIntersectingObject(Gestein.class)).wertGestein();
wertDifferenz = wert - wertAlt;
nachricht("Diese Ware ist " + wertDifferenz + " Taler wert");
boolean annahme;
sammeln(annahme);
Greenfoot.delay(1);
removeTouching(Gestein.class);
}
else
{
nachricht("Hier ist kein Gestein");
}
}
public void sammeln(boolean annahme)
I cannot get this section to work. It says that variable "annahme" is not initialised and that is because it is not. It is supposed to be specified by the player once the previous check "if(gesteinVorhanden())" has been finished. Only then should "public void sammeln(boolean annahme)" be executed and a true or false should be given. : ( And "boolean annahme; sammeln(annahme); are correctly preparing that part, no? : (