private void handleWin() { game.revealPuzzle(); JOptionPane.showMessageDialog( null, "Congratulations, you win $" + game.getScore() + "!\n\n", "You Win!", JOptionPane.INFORMATION_MESSAGE); newGame(); }
private void handleLoss(String message) { game.revealPuzzle(); JOptionPane.showMessageDialog( null, message + "\nSorry, you lose.", "You Lose!", JOptionPane.INFORMATION_MESSAGE); newGame(); }
private void setEnabledGuessedLetters(boolean b) { for (char c : game.getGuessedLetters()) { letterButtons[c - 65].setEnabled(b); } }