"cannot find constructor person"-im overwhelmed
public void Person() { ... }
int randomX = Greenfoot.getRandomNumber(getWorld().getWidth()); int randomY = Greenfoot.getRandomNumber(getWorld().getHeight()); addObject(new Person(), randomX, randomY);
public void Person(int myAge, int myInfectStage) { ... }
addObject(new Person(myAge, myInfectStage), randomX, randomY);
int myAge = Greenfoot.getRandomNumber(100); int myInfectStage = 0; // If you want to create a Person who is already infected, change '0', to '1' or '2' (whatever stage)
int myAge = Greenfoot.getRandomNumber(100); int myInfectStage = 0; // If you want to create a Person who is already infected, change '0', to '1' or '2' (whatever stage)
addObject(new Person(myAge, myInfectStage), x, y);
getWorld().addObject(new Person(myAge, myInfectStage), x, y);
public Person(int myAge, int myInfectStage) { ... }
addObject(new Person(int, int), x, y);
int myAge = Greenfoot.getRandomNumber(100); int myInfectStage = 0; // If you want to create a Person who is already infected, change '0', to '1' or '2' (whatever stage)