i was thinking of having a car that keeps going for a bit after u take the throttle off, does anyone know how to get this to work?
int ds = -1;
if (Greenfoot.isKeyDown("up")) ds += 20;
// adjust speed
speed += ds;
if (speed < 0) speed = 0;
if (speed > 2000) speed = 2000;
// and move
if (speed >= 200) move(speed / 100);