public  void checkLives()
    {
        // Whenever player lose life, remove corresponding life bar
        if (lives == 3) 
        {
            removeObject(live3);
        }
        if (lives == 2)
        { 
            removeObject(live2);
        }
        if (lives == 1)
        { 
            removeObject(live1);            
            // End game. Remove Actors from world.
            backgroundMusic.stop();
            // play game over sound
            gameOverSound();
            // Display GameOver screen
            gameOver = new GameOver();
            addObject (gameOver, 350,260);
            removeObjects(getObjects(Smoke.class)); 
            removeObjects(getObjects(Ball.class)); 
            removeObjects(getObjects(Pointy.class));
            // end game when gameover sound is finished playing            
            if (played)
            {
                Greenfoot.stop();
            }
        }   
    }