setLocation(getX()+ dy,getY());
if (Greenfoot.isKeyDown("space")== true){
dy= 0;
}
if(Greenfoot.isKeyDown("left") == true){
dy= -10;
}
if (Greenfoot.isKeyDown("right") == true){
dy= 10;
}
How can l code..
that l can press "left" or "right" just once after l press "space" and then again and again)
so it goes like this
at the begging of game l can just press "space"
when l press "space" l can just press "left" or "right" just once
and when l press "left" or "right" l can just press space and then again and again


