Sbaliyev wrote...
Every capital must asked 1 time not more how am i suppose to do this?// add instance field private List<Locatie> locaties; // add as last statement in 'populateWorld' method locaties = (List<Locatie>) getObjects(Locatie.class);
// change 'setLocatie' method to the following
private void setLocatie()
{
// check for an empty list (all have been chosen)
if (locaties.isEmpty())
{
Greenfoot.stop();
return;
}
// choose and remove from list
actieveLocatie = locaties.remove(Greenfoot.getRandomNumber(locaties.size));
vragen.toonVraag(actieveLocatie.getName());
}
