Tried making a game earlier and everything was going fine until when I was almost finished the game did not run because a message keeps on saying "no suitable method found for move", please help me I really need this game for my work:) Below is the code and the word "move" keeps on having the message pop up "no suitable method found for move". please help me:)
public class Bullets extends Mover
{
private int life = (Greenfoot.getRandomNumber(50) + 100);
/**
* Act - do whatever the Bullets wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
splatter();
getThanos();
move(20,0);
life--;
if (life == 0)
{
getWorld().addObject(new Splat(), getX(), getY());
getWorld().removeObject(this);
}
}
public void getThanos()
{
if (isTouching(Thanos.class))
{
removeTouching(Thanos.class);
getWorld().addObject(new Thanos(), Greenfoot.getRandomNumber(getWorld().getWidth()/2), Greenfoot.getRandomNumber(getWorld().getHeight()));
}
}
public void splatter()
{
if(isTouching(Thanos.class))
{
Splat splat = new Splat();
getWorld().addObject(splat, getX(), getY());
}
}
}
