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

2018/1/20

I have no clue where the error in the code is.

rory rory

2018/1/20

#

import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

public class grassworld extends World
{
    /**
     * Create My world (grass). Our world has a size 
     * of 600x600 cells, where every cell is just 1 pixel.
     */
    public grassworld()
   {    
        super(900, 700, 1); 
   }
   public void act()
   {
   private int timer = 3600
   {
   if (time>0);
   {
       timer--;
       if (timer==0) 
       Greenfoot.stop();
   }
   }
   }
}
CxVercility CxVercility

2018/1/20

#
Line 17, time(r)
danpost danpost

2018/1/20

#
And line 15 should be placed outside the act method.
You need to login to post a reply.