I am trying to make Bomberman but I don't know how to let the Bomberman spawn a bomb. I am new with java so could someone help me, please?
public void act()
{
move(0);
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);
} this.getWorld().addObject(new Bomb(<any attributes that the bomb has>), this.getX(), this.getY());