help, it s my first day here and i m already having problems
why isn t my Greenfoot.stop() working in this case?
public class Spaceship extends Actor { public void act() { if(Greenfoot.isKeyDown("w") ) move(5); if(Greenfoot.isKeyDown("s") ) move(-5); if(Greenfoot.isKeyDown("d") ) turn(5); if(Greenfoot.isKeyDown("a") ) turn(-5); if( is.Touching (Asteroid.class) ) Greenfoot.stop(); } }