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

kiarocks's Comments

Back to kiarocks's profile

many colors
danpost, identifier expected for the setspeed
thanks, ill see if it works
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class InfectWorld here. * * @author (your name) * @version (a version number or a date) */ public class InfectWorld extends World { /** * Constructor for objects of class InfectWorld. * */ public InfectWorld() { super(15, 13, 60); prepare(); } { Greenfoot.setSpeed(25); } /** * Prepare the world for the start of the program. That is: create the initial * objects and add them to the world. */ private void prepare() { Rock rock = new Rock(); addObject(rock, 5, 4); Rock rock2 = new Rock(); addObject(rock2, 8, 5); Rock rock3 = new Rock(); addObject(rock3, 5, 8); Rock rock4 = new Rock(); addObject(rock4, 2, 9); Rock rock5 = new Rock(); addObject(rock5, 9, 9); Rock rock6 = new Rock(); addObject(rock6, 10, 6); Rock rock7 = new Rock(); addObject(rock7, 7, 3); UnInfected uninfected = new UnInfected(); addObject(uninfected, 4, 6); UnInfected uninfected2 = new UnInfected(); addObject(uninfected2, 7, 6); UnInfected uninfected3 = new UnInfected(); addObject(uninfected3, 6, 9); UnInfected uninfected4 = new UnInfected(); addObject(uninfected4, 8, 10); UnInfected uninfected5 = new UnInfected(); addObject(uninfected5, 11, 10); UnInfected uninfected6 = new UnInfected(); addObject(uninfected6, 12, 6); UnInfected uninfected7 = new UnInfected(); addObject(uninfected7, 10, 4); UnInfected uninfected8 = new UnInfected(); addObject(uninfected8, 5, 2); InfectLv1 infectlv1 = new InfectLv1(); addObject(infectlv1, 11, 1); InfectLv2 infectlv2 = new InfectLv2(); addObject(infectlv2, 13, 3); UnInfected uninfected9 = new UnInfected(); addObject(uninfected9, 9, 2); UnInfected uninfected10 = new UnInfected(); addObject(uninfected10, 7, 1); UnInfected uninfected11 = new UnInfected(); addObject(uninfected11, 4, 1); UnInfected uninfected12 = new UnInfected(); addObject(uninfected12, 3, 1); UnInfected uninfected13 = new UnInfected(); addObject(uninfected13, 1, 3); UnInfected uninfected14 = new UnInfected(); addObject(uninfected14, 1, 5); UnInfected uninfected15 = new UnInfected(); addObject(uninfected15, 2, 6); UnInfected uninfected16 = new UnInfected(); addObject(uninfected16, 3, 8); UnInfected uninfected17 = new UnInfected(); addObject(uninfected17, 4, 9); UnInfected uninfected18 = new UnInfected(); addObject(uninfected18, 5, 9); UnInfected uninfected19 = new UnInfected(); addObject(uninfected19, 6, 7); UnInfected uninfected20 = new UnInfected(); addObject(uninfected20, 4, 6); UnInfected uninfected21 = new UnInfected(); addObject(uninfected21, 4, 5); UnInfected uninfected22 = new UnInfected(); addObject(uninfected22, 3, 5); UnInfected uninfected23 = new UnInfected(); addObject(uninfected23, 2, 4); UnInfected uninfected24 = new UnInfected(); addObject(uninfected24, 2, 3); UnInfected uninfected25 = new UnInfected(); addObject(uninfected25, 2, 2); UnInfected uninfected26 = new UnInfected(); addObject(uninfected26, 1, 2); UnInfected uninfected27 = new UnInfected(); addObject(uninfected27, 1, 3); UnInfected uninfected28 = new UnInfected(); addObject(uninfected28, 0, 5); UnInfected uninfected29 = new UnInfected(); addObject(uninfected29, 0, 6); UnInfected uninfected30 = new UnInfected(); addObject(uninfected30, 0, 9); UnInfected uninfected31 = new UnInfected(); addObject(uninfected31, 0, 10); UnInfected uninfected32 = new UnInfected(); addObject(uninfected32, 3, 10); UnInfected uninfected33 = new UnInfected(); addObject(uninfected33, 5, 11); UnInfected uninfected34 = new UnInfected(); addObject(uninfected34, 6, 11); UnInfected uninfected35 = new UnInfected(); addObject(uninfected35, 6, 11); UnInfected uninfected36 = new UnInfected(); addObject(uninfected36, 6, 11); } }
ok, dan, how do i fix it looking like a gray screen with a box in the center
^it died^
now it works!
hey check the post ive been talking on
arrow needs fixing, danpost