isKeyDown() seems to lock up and stop working after a little bit if I call it too much. Here is my code:
Any suggestions or ideas on how to fix this would be great.
if (Greenfoot.isKeyDown("w"))
y -= SPEED;
if (Greenfoot.isKeyDown("s"))
y += SPEED;
if (Greenfoot.isKeyDown("a"))
x -= SPEED;
if (Greenfoot.isKeyDown("d"))
x += SPEED;
setLocation((int)x, (int)y);