All i have is
public void checkKeyPress()
{
if(Greenfoot.isKeyDown("up"))
{
setLocation(getX(), getY()-3);
}
if(Greenfoot.isKeyDown("down"))
{
setLocation(getX(), getY()+3);
}
if(Greenfoot.isKeyDown("right"))
{
setLocation(getX()+3, getY());
}
if(Greenfoot.isKeyDown("left"))
{
setLocation(getX()-3, getY());
}
}
for he frog to move around with arrow keys
I need help whenever the frog moves on top of the fly, the fly dissapears, and the score goes up