@Override
    public boolean handleKeyboardEvent() {
        // Do not handle keyboard event if the game is not paused
        if(!paused)
            return Input.UNHANDLED;
        
        if(Input.keyboardKey(Keyboard.KEY_RETURN, true) && game.isGameOver() == 0) {
            // Unpause game
            setPaused(false);
            
            return Input.HANDLED;
        }
        
        if(Input.keyboardKey(Keyboard.KEY_ESCAPE, true)) {
            // Request transition to main menu
            Main.requestNewState(Main.States.MAIN_MENU);
            
            return Input.HANDLED;
        }
        
        if(Input.keyboardKey(Keyboard.KEY_R, true)) {
            // Request restart
            Game game2 = (Game) Main.requestNewState(Main.States.GAME);
            game2.loadLevel = game.loadLevel;
            
            return Input.HANDLED;
        }
        
        // Event, you shall not pass!
        return Input.HANDLED;
    }