This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

danpostdanpost

2011/6/11

First, get rid of the two brackets between 'prepare();' and 'Greenfoot.setSpeed(25);'. Next, assign an image to the 'InfectWorld' class (even if it a blank image). NOTE: Would it not have been easier to use a for loop as such: for (int uninf = 0; uninf < 36; uninf++) { int myX = Greenfoot.getRandomNumber(15); int myY= Greenfoot.getRandomNumber(13); UnInfected uninfected = new UnInfected(); addObject(uninfected, myX, myY); } This would add all your UnInfecteds!
danpostdanpost

2011/6/11

What does your code in 'theWorld' look like?
danpostdanpost

2011/6/11

Edit your scenario -- put in a description: What is does or demonstrates. What to look for that indicates state of Actors (when infected; what turned image means, etc.
I'm not sure why -- Runs fine one time; Not so the next. Compiles different each time.
I'm not sure why -- Runs fine one time; Not so the next. Compiles different each time.