I want to have a shell that falls to the ground when the shot is fired but im struggling to have a randomiser
does any body have any idea please help


int RandomNum = 0; public void RandomNumber(int min, int max) { RandomNum = Greenfoot.getRandomNumber(max-min)+min; }
public void fire() { Bullet b = new Bullet(); getWorld().addObject(b,getX(),getY()); //shell s= new shell(); //getWorld().addObject(s,getX(),getY()); b.setRotation(getRotation()); b.move(20); }
public void act() {move(1); } public void fall() { int r=Greenfoot.getRandomNumber(100)-50; turnTowards(r+70,600); }