Is there anyway to limit a keyDown to run only once?
For example I want to roll two dice but want it for everytime space is pressed, but when space is held it continuously rolls both dice.
Here is the part of the code for the keyDown:
if (Greenfoot.isKeyDown("space"))
{
roller = false;
int xx = Greenfoot.getRandomNumber(6);

