Hi, I really new to Greenfoot and I need some help. What I am trying to do is with a certain chance someone is "infected" (the object is removed). I have used the following code but nothing seems to happen?
It's probably some stupid mistake on my part but I just can't get my head around it :/
Thanks in advance!
/**
* Infect a Survivor with Virus
*/
public void infect()
{
if(Greenfoot.getRandomNumber(100)<50)
{
removeObject(SurvivorWASD);
}
if(Greenfoot.getRandomNumber(100) >50)
{
removeObject(SurvivorWASD);
}
}
