Hey, I want my wombat to move randomly, left, right, up and down, but i dont want it to turn.
How would I do this? I guess i would use:
but how would i randomly alternate between these four movements?
if(Greenfoot.isKeyDown("right")) setLocation(getX()+3, getY());
if(Greenfoot.isKeyDown("left")) setLocation(getX()-3, getY());
if(Greenfoot.isKeyDown("down")) setLocation(getX(), getY()+3);
if(Greenfoot.isKeyDown("up")) setLocation(getX(), getY()-3);
