This is the code, but it doesn't work.
When you press q and there is an actor on 0,2 he should turn gray but he makes it red, so he should follow if but instead he follows else.
public void removeFromWorld() { if ("q".equals(Greenfoot.getKey())) { if (this.getX() == 0 && this.getY() == 2) { setImage(new GreenfootImage("grijs.png")); getWorld().addObject(new blokje(), Greenfoot.getRandomNumber(4), 0 ); setLocation(getX(), getY()+1); Greenfoot.playSound("POP.mp3"); } else { getWorld().addObject(new Rood(), 0, 2 ); Greenfoot.stop(); Greenfoot.playSound("Lose.mp3"); } }