private void handleDoubleJeopardy() { Player player = askForPlayer(); Integer wager = askForWager(player); Players.setDoubleJeopardyPlayer(player); getFrame().setDoubleJeopardyWager(wager); }
private Player askForPlayer() { Optional<Player> player; do { player = Dialogs.create() .owner(null) .title("Double Jeopardy!") .masthead(null) .message("You have encountered a Double Jeopardy!\nWhich player are you?") .showChoices(Players.getPlayerList()); } while (player == null); return player.get(); }