public void actionPerformed(ActionEvent e)  {
    	
    	if(e.getSource() == pause){
    		
    		if(checkButtonClick == 1){
    			game.getWorld().pause();
    			checkButtonClick = 2;
    			 pause.setText("Resume");
    			
    		}
    			
    		else if(checkButtonClick == 2){
    			checkButtonClick = 1;
    			game.getWorld().unpause();
    		     pause.setText("Pause");
    			
    		}
    	} else if(e.getSource() == restart){
    		
    	   		
    		game.getlevel().clearLevel();
       		game.getlevel().populate();
    		game.getlevel().putPlayerAtStart();
    		game.getlevel().isCompleted();
            game.getPlayer().setLives(5);
    	  		
    	
    		
    	} else if(e.getSource() == nextlevel){
    		   		
    	    	
        		game.nextLevel();

        		
    		
    		
    	} else if(e.getSource() == endGame){
    		
    		
    		
   
    		game.gameOver();
    		
    	}
    	
    	
    	
    	
    }