public static void playGame(HangmanUI ui) {
    
        HangmanGame hg = initializeGame(ui);
        while (!hg.userWon() && !hg.userLost()) {
            showResults(hg,ui);
        }
        
        if (ui.confirmUser("Play again?")) playGame(ui);
        else ui.tellUser("Goodbye");
    }