I want to make a game like Retro Snaker,but I dont know how to make one object disappears and it appears in a random place immediately. Thank you if you can give some advice.
if (< condition >)
{
int x = Greenfoot.getRandomNumber(getWorld().getWidth());
int y = Greenfoot.getRandomNumber(getWorld().getHeight());
setLocation(x, y);
}